-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
Not sure if this is by design or not. But it's a bit odd.
Line 140 in 970db52
| return defaultBackend.IsEnabledFor(level, l.Module) |
In my code I was establishing my own logger with its own backend, e.g.
diagLogger, err := logging.GetLogger(diagModuleName)
if err != nil {
return ret, err
}
fileBackend := logging.NewLogBackend(diagnosticsFile, "", stdlog.LstdFlags)
leveledBackend := logging.AddModuleLevel(fileBackend)
leveledBackend.SetLevel(logging.DEBUG, diagModuleName)
diagLogger.SetBackend(leveledBackend)the effect of that leveledBackend.SetLevel(logging.DEBUG, diagModuleName) doesn't seem to do anything,
cause when we log with diagLogger.Debug then it seems to be querying the "default backend"...
I am solving this by just setting the log level for the given module in the default backend as well... But seemed worth pointing this out. Perhaps it's intended, but seemed a bit iffy.
Metadata
Metadata
Assignees
Labels
No labels