diff --git a/util/logger/logger.go b/util/logger/logger.go index 021c270..82d67cd 100644 --- a/util/logger/logger.go +++ b/util/logger/logger.go @@ -19,18 +19,6 @@ func New(isDebug bool) *Logger { logLevel = zerolog.TraceLevel } - zerolog.SetGlobalLevel(logLevel) - logger := zerolog.New(os.Stderr).With().Timestamp().Logger() - - return &Logger{logger: &logger} -} - -func NewConsole(isDebug bool) *Logger { - logLevel := zerolog.InfoLevel - if isDebug { - logLevel = zerolog.TraceLevel - } - zerolog.SetGlobalLevel(logLevel) logger := zerolog.New(os.Stdout).With().Timestamp().Logger() diff --git a/util/logger/logger_test.go b/util/logger/logger_test.go index 5de1d3b..76a5a6e 100644 --- a/util/logger/logger_test.go +++ b/util/logger/logger_test.go @@ -28,7 +28,7 @@ func setup() *logger.Logger { return time.Date(2008, 1, 8, 17, 5, 5, 0, time.UTC) } - return logger.NewConsole(true) + return logger.New(true) } // Simple logging example using the Print function in the log package