mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Log the config after loading
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
|
||||
"novamd/internal/app"
|
||||
"novamd/internal/logging"
|
||||
)
|
||||
|
||||
// @title NovaMD API
|
||||
@@ -23,6 +24,10 @@ func main() {
|
||||
log.Fatal("Failed to load configuration:", err)
|
||||
}
|
||||
|
||||
// Setup logging
|
||||
logging.Setup(cfg.LogLevel)
|
||||
logging.Debug("Configuration loaded", "config", logging.Redact(cfg))
|
||||
|
||||
// Initialize and start server
|
||||
options, err := app.DefaultOptions(cfg)
|
||||
if err != nil {
|
||||
@@ -32,7 +37,7 @@ func main() {
|
||||
server := app.NewServer(options)
|
||||
defer func() {
|
||||
if err := server.Close(); err != nil {
|
||||
log.Println("Error closing server:", err)
|
||||
logging.Error("Failed to close server:", err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user