mirror of https://github.com/sirupsen/logrus.git
Adding SetLevel function to FieldLogger
This commit is contained in:
parent
95e784aa4d
commit
6abeffb8b1
4
entry.go
4
entry.go
|
@ -278,6 +278,10 @@ func (entry *Entry) write() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (entry *Entry) SetLevel(level Level) {
|
||||||
|
entry.Logger.SetLevel(level)
|
||||||
|
}
|
||||||
|
|
||||||
func (entry *Entry) IsLevelEnabled(level Level) bool {
|
func (entry *Entry) IsLevelEnabled(level Level) bool {
|
||||||
return entry.Logger.IsLevelEnabled(level)
|
return entry.Logger.IsLevelEnabled(level)
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,7 @@ type FieldLogger interface {
|
||||||
Fatalln(args ...interface{})
|
Fatalln(args ...interface{})
|
||||||
Panicln(args ...interface{})
|
Panicln(args ...interface{})
|
||||||
|
|
||||||
|
SetLevel(level Level)
|
||||||
IsLevelEnabled(level Level) bool
|
IsLevelEnabled(level Level) bool
|
||||||
// IsDebugEnabled() bool
|
// IsDebugEnabled() bool
|
||||||
// IsInfoEnabled() bool
|
// IsInfoEnabled() bool
|
||||||
|
|
Loading…
Reference in New Issue