logger: remove SetLevel from logger interface
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
8b7380876e
commit
49d54f7fe6
@ -18,8 +18,6 @@ type Logger interface {
|
||||
V(level Level) bool
|
||||
// The Logger options
|
||||
Options() Options
|
||||
// SetLevel modify current log level
|
||||
SetLevel(level Level)
|
||||
// Fields set fields to always be logged
|
||||
Fields(fields map[string]interface{}) Logger
|
||||
// Info level message
|
||||
|
@ -41,19 +41,6 @@ func (l *defaultLogger) String() string {
|
||||
return "micro"
|
||||
}
|
||||
|
||||
func (l *defaultLogger) SetLevel(level Level) {
|
||||
l.Lock()
|
||||
l.opts.Level = level
|
||||
l.Unlock()
|
||||
}
|
||||
|
||||
func (l *defaultLogger) GetLevel() Level {
|
||||
l.RLock()
|
||||
lvl := l.opts.Level
|
||||
l.RUnlock()
|
||||
return lvl
|
||||
}
|
||||
|
||||
func (l *defaultLogger) V(level Level) bool {
|
||||
l.RLock()
|
||||
ok := l.opts.Level.Enabled(level)
|
||||
|
Loading…
x
Reference in New Issue
Block a user