mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 11:42:35 -06:00
Merge pull request #4065 from grafana/log-level-fix
allow setting level on logger.
This commit is contained in:
commit
fee9df4c2b
@ -35,6 +35,15 @@ func NewLogger(bufLen int64, mode, config string) {
|
||||
}
|
||||
}
|
||||
|
||||
// this helps you work around the performance annoyance mentioned in
|
||||
// https://github.com/grafana/grafana/issues/4055
|
||||
// until we refactor this library completely
|
||||
func Level(level LogLevel) {
|
||||
for i := range loggers {
|
||||
loggers[i].level = level
|
||||
}
|
||||
}
|
||||
|
||||
func Trace(format string, v ...interface{}) {
|
||||
for _, logger := range loggers {
|
||||
logger.Trace(format, v...)
|
||||
|
Loading…
Reference in New Issue
Block a user