tstor/log/log.go
2021-11-18 20:36:07 +01:00

16 lines
353 B
Go

package log
import (
"github.com/mattn/go-colorable"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
func Load() {
// fix console colors on windows
cso := colorable.NewColorableStdout()
log.Logger = log.Output(zerolog.ConsoleWriter{Out: cso})
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
zerolog.SetGlobalLevel(zerolog.InfoLevel)
}