Merge pull request #1674 from grouville/windows-logs

Windows escape sequence fix
This commit is contained in:
Andrea Luzzardi
2022-03-09 17:12:15 -08:00
committed by GitHub
3 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import (
"fmt"
"os"
"github.com/mattn/go-colorable"
"github.com/rs/zerolog"
"github.com/spf13/viper"
"golang.org/x/term"
@@ -22,7 +23,7 @@ func New() zerolog.Logger {
Logger()
if !jsonLogs() {
logger = logger.Output(&PlainOutput{Out: os.Stderr})
logger = logger.Output(&PlainOutput{Out: colorable.NewColorableStderr()})
} else {
logger = logger.With().Timestamp().Caller().Logger()
}