prun-trade-bot-go/lib/logging/init.go

19 lines
282 B
Go

package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"os"
)
func InitLogging() error {
switch os.Getenv("LOG_FORMAT") {
default:
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: zerolog.TimeFieldFormat})
}
return nil
}