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:
parent
ac1858a19e
commit
bac623f63c
|
|
@ -24,6 +24,8 @@ func Init(cfg *Config) error {
|
||||||
if err := level.UnmarshalText([]byte(cfg.Level)); err != nil {
|
if err := level.UnmarshalText([]byte(cfg.Level)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Debug output to verify level parsing
|
||||||
|
println("DEBUG: Parsed level:", level.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
encoding := "json"
|
encoding := "json"
|
||||||
|
|
@ -72,6 +74,9 @@ func Init(cfg *Config) error {
|
||||||
// Replace global zap logger to ensure our config takes effect
|
// Replace global zap logger to ensure our config takes effect
|
||||||
zap.ReplaceGlobals(Log)
|
zap.ReplaceGlobals(Log)
|
||||||
|
|
||||||
|
// Debug output to verify logger initialization
|
||||||
|
println("DEBUG: Logger initialized with level:", Log.Level().String())
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue