mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
20 lines
370 B
Go
20 lines
370 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()
|
|
}
|
|
}
|