Fix problems on windows (#87)
This commit is contained in:
parent
df7f1ce8be
commit
66eadf35dc
9 changed files with 67 additions and 28 deletions
log
16
log/log.go
Normal file
16
log/log.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue