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
|
V(level Level) bool
|
||||||
// The Logger options
|
// The Logger options
|
||||||
Options() Options
|
Options() Options
|
||||||
// SetLevel modify current log level
|
|
||||||
SetLevel(level Level)
|
|
||||||
// Fields set fields to always be logged
|
// Fields set fields to always be logged
|
||||||
Fields(fields map[string]interface{}) Logger
|
Fields(fields map[string]interface{}) Logger
|
||||||
// Info level message
|
// Info level message
|
||||||
|
@ -41,19 +41,6 @@ func (l *defaultLogger) String() string {
|
|||||||
return "micro"
|
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 {
|
func (l *defaultLogger) V(level Level) bool {
|
||||||
l.RLock()
|
l.RLock()
|
||||||
ok := l.opts.Level.Enabled(level)
|
ok := l.opts.Level.Enabled(level)
|
||||||
|
Loading…
Reference in New Issue
Block a user