mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-16 04:44:55 +02:00
18 lines
319 B
Go
18 lines
319 B
Go
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()
|
|
}
|
|
}
|