debug(logger): add AtomicLevel tracking to diagnose level changes
Added debug output to track: 1. AtomicLevel value when created 2. AtomicLevel value after Build() 3. Log.Level() value after Build() This will help identify if Build() or something else is changing the level. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bfe129da51
commit
3a247562ea
|
|
@ -38,8 +38,11 @@ func Init(cfg *Config) error {
|
|||
outputPath = cfg.OutputPath
|
||||
}
|
||||
|
||||
atomicLevel := zap.NewAtomicLevelAt(level)
|
||||
println("DEBUG: Created AtomicLevel:", atomicLevel.String())
|
||||
|
||||
zapConfig := zap.Config{
|
||||
Level: zap.NewAtomicLevelAt(level),
|
||||
Level: atomicLevel,
|
||||
Development: false,
|
||||
DisableCaller: false,
|
||||
DisableStacktrace: false,
|
||||
|
|
@ -69,6 +72,9 @@ func Init(cfg *Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
println("DEBUG: After Build, AtomicLevel:", atomicLevel.String())
|
||||
println("DEBUG: After Build, Log.Level():", Log.Level().String())
|
||||
|
||||
Sugar = Log.Sugar()
|
||||
|
||||
// Replace global zap logger to ensure our config takes effect
|
||||
|
|
|
|||
Loading…
Reference in New Issue