Skip to content

Commit

Permalink
🌱 Sync with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dumindu committed Oct 21, 2023
1 parent 4147e13 commit 395c160
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions util/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion util/logger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 395c160

Please sign in to comment.