diff --git a/log.go b/log.go index 7ca7b8a..969a22d 100644 --- a/log.go +++ b/log.go @@ -94,9 +94,9 @@ func (log *Logger) SetLogLevel(newlv LogLevel) (oldlv LogLevel) { // SetLogLevelByName set new log level by level name func (log *Logger) SetLogLevelByName(newlv string) (oldlv string) { if newlevel, ok := mapStrToLevel[newlv]; ok { - oldlv = log.loglevel + oldlevel := log.loglevel log.loglevel = newlevel - return mapLevelToStr[oldlv] + return mapLevelToStr[oldlevel] } return ErrLogLevel }