tstor/log/log.go

17 lines
353 B
Go
Raw Normal View History

2021-11-18 19:36:07 +00:00
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)
}