1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-19 05:10:02 +02:00

move src/helpers.go to src/utils/parse_log_formatter.go

This commit is contained in:
Henrik Hautakoski 2022-10-21 13:13:02 +02:00
parent 97d9e662ce
commit 818cf7e7e5
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
4 changed files with 8 additions and 7 deletions

View file

@ -0,0 +1,20 @@
package utils
import (
log "github.com/inconshreveable/log15"
)
func ParseLogFormatter(name string) log.Format {
switch name {
case "logfmt" :
return log.LogfmtFormat()
case "json" :
return log.JsonFormat()
case "json-pretty" :
return log.JsonFormatEx(true, true)
default :
return log.TerminalFormat()
}
}