Skip to content

Commit

Permalink
log: make log level case insensitive (#407)
Browse files Browse the repository at this point in the history
Signed-off-by: SpadeA-Tang <[email protected]>
  • Loading branch information
SpadeA-Tang authored Jul 6, 2022
1 parent 28f1258 commit be014c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"log"
"os"
"runtime"
"strings"
)

const (
Expand Down Expand Up @@ -232,6 +233,7 @@ func (l *Logger) Infof(format string, v ...interface{}) {
}

func StringToLogLevel(level string) LogLevel {
level = strings.ToLower(level)
switch level {
case "fatal":
return LOG_LEVEL_FATAL
Expand Down

0 comments on commit be014c2

Please sign in to comment.