Skip to content

Commit

Permalink
added String() func for log types
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Arnheiter committed Nov 1, 2021
1 parent 85c9f91 commit 030eb0d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ var (
LogLevel = INFO
)

func (l LogLevelType) String() string {
switch l {
case TRACE:
return "TRACE"
case DEBUG:
return "DEBUG"
case WARN:
return "WARN"
case ERROR:
return "ERROR"
case FATAL:
return "FATAL"
default:
return "INFO"
}
}

func Println(args ...interface{}) {
Infoln(args...)
}
Expand Down

0 comments on commit 030eb0d

Please sign in to comment.