更新 format.go
This commit is contained in:
parent
5b8be57c69
commit
4811fbbbe5
|
@ -9,7 +9,7 @@ const logTemplate = "[%s] %s : %s - %s\n"
|
||||||
func format(logEvent LogEvent) string {
|
func format(logEvent LogEvent) string {
|
||||||
data := logEvent.Ts.Format("2006-01-02 15:04:05")
|
data := logEvent.Ts.Format("2006-01-02 15:04:05")
|
||||||
msg := fmt.Sprint(logEvent.Data...)
|
msg := fmt.Sprint(logEvent.Data...)
|
||||||
ret := fmt.Sprintf(logTemplate, data, logEvent.Category getLogLevelStr(logEvent.Level), msg)
|
ret := fmt.Sprintf(logTemplate, data, logEvent.Category, getLogLevelStr(logEvent.Level), msg)
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue