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

19 lines
282 B
Go
Raw Permalink Normal View History

2024-07-17 14:56:53 +02:00
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
}