Change return value of NoopBackend.Level() to DefaultLevel

This commit is contained in:
Bruno Carlin 2020-02-01 10:38:50 +01:00
parent f8dc5855e3
commit 5c9b362285
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,8 @@
## Unreleased ## Unreleased
- Uncompatible change: log level names hace changed. They were fully - Uncompatible: log level names hace changed. They were fully
capitalized, only their first letter is capitalized now: DEBUG -> Debug, capitalized, only their first letter is capitalized now: DEBUG -> Debug,
INFO -> Info, etc. INFO -> Info, etc.
- Uncompatible NoopBackend.Level() now returns DefaultLevel instead of Fatal
- Fix: creates new logger with level DefaultLevel instead of Debug - Fix: creates new logger with level DefaultLevel instead of Debug

View file

@ -117,7 +117,7 @@ func (nb *NoopBackend) SetFormatter(f *Formatter) {}
func (nb *NoopBackend) SetLevel(level Level) {} func (nb *NoopBackend) SetLevel(level Level) {}
func (nb *NoopBackend) Level() Level { func (nb *NoopBackend) Level() Level {
return FATAL return DefaultLevel
} }
func (nb *NoopBackend) Reopen() error { func (nb *NoopBackend) Reopen() error {