logger: remove SetLevel from logger interface

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-01-12 09:26:14 +03:00
parent 8b7380876e
commit 49d54f7fe6
2 changed files with 0 additions and 15 deletions

View File

@ -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

View File

@ -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)