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

View File

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