Fix to not log time in output (#3)

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/go-plugin/pulls/3
This commit is contained in:
Lauris BH 2023-01-09 12:33:18 +00:00
parent 8208462a69
commit 276c549ebf

View File

@ -42,8 +42,8 @@ func SetupConsoleLogger(c *cli.Context) error {
}
zerolog.SetGlobalLevel(lvl)
log.Logger = zerolog.New(zerolog.ConsoleWriter{
Out: os.Stdout,
FieldsExclude: []string{"time"},
Out: os.Stdout,
PartsExclude: []string{zerolog.TimestampFieldName},
}).With().Timestamp().Logger()
if zerolog.GlobalLevel() <= zerolog.DebugLevel {
log.Logger = log.With().Caller().Logger()