debug(logger): add detailed debug output for level initialization

Added println statements to trace:
1. Level value after UnmarshalText
2. Logger level after Build()

This will help diagnose why debug level is not being applied.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-06 03:16:05 -08:00
parent ac1858a19e
commit bac623f63c
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,8 @@ func Init(cfg *Config) error {
if err := level.UnmarshalText([]byte(cfg.Level)); err != nil {
return err
}
// Debug output to verify level parsing
println("DEBUG: Parsed level:", level.String())
}
encoding := "json"
@ -72,6 +74,9 @@ func Init(cfg *Config) error {
// Replace global zap logger to ensure our config takes effect
zap.ReplaceGlobals(Log)
// Debug output to verify logger initialization
println("DEBUG: Logger initialized with level:", Log.Level().String())
return nil
}