mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add logger
This commit is contained in:
parent
c6d9eb3614
commit
1d8193b892
56 changed files with 228 additions and 192 deletions
|
@ -6,10 +6,10 @@ package storage
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"log"
|
||||
|
||||
// Postgresql driver import
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/miniflux/miniflux/logger"
|
||||
)
|
||||
|
||||
// Storage handles all operations related to the database.
|
||||
|
@ -26,7 +26,7 @@ func (s *Storage) Close() {
|
|||
func NewStorage(databaseURL string, maxOpenConns int) *Storage {
|
||||
db, err := sql.Open("postgres", databaseURL)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to connect to the database: %v", err)
|
||||
logger.Fatal("[Storage] Unable to connect to the database: %v", err)
|
||||
}
|
||||
|
||||
db.SetMaxOpenConns(maxOpenConns)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue