diff --git a/api/cmd/portainer/log.go b/api/cmd/portainer/log.go index 52cd3ee63..1623b4fd7 100644 --- a/api/cmd/portainer/log.go +++ b/api/cmd/portainer/log.go @@ -1,6 +1,8 @@ package main import ( + stdlog "log" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/rs/zerolog/pkgerrors" @@ -11,6 +13,9 @@ func configureLogger() { zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack zerolog.TimeFieldFormat = zerolog.TimeFormatUnix + stdlog.SetFlags(0) + stdlog.SetOutput(log.Logger) + log.Logger = log.Logger.With().Caller().Stack().Logger() }