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:
parent
97d9e662ce
commit
818cf7e7e5
4 changed files with 8 additions and 7 deletions
20
src/utils/parse_log_formatter.go
Normal file
20
src/utils/parse_log_formatter.go
Normal 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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue