mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
added level in logging
This commit is contained in:
parent
ef3ef2bc50
commit
6eb33c6978
@ -38,7 +38,7 @@ func log(msg string, level Level) string {
|
||||
prefix := time.Now().Format(time.RFC3339Nano) + " " + prefices[level]
|
||||
lines := strings.Split(msg, "\n")
|
||||
for i := 0; i < len(lines); i++ {
|
||||
fmt.Println(prefix + lines[i])
|
||||
fmt.Println(level, prefix+lines[i])
|
||||
}
|
||||
}
|
||||
return msg
|
||||
|
||||
Loading…
Reference in New Issue
Block a user