refactor: migrate all log statements to structured logger calls for improved observability
This commit is contained in:
+2
-2
@@ -3,8 +3,8 @@ package db
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/hireme/hireme/internal/logger"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ func InitDB(dbPath string) (*DB, error) {
|
||||
return nil, fmt.Errorf("failed to run sqlite migrations: %w", err)
|
||||
}
|
||||
|
||||
log.Printf("[DB] SQLite database initialized successfully at %s", dbPath)
|
||||
logger.Log.Infow("SQLite database initialized successfully", "component", "DB", "dbPath", dbPath)
|
||||
return database, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user