Skip to content

Commit

Permalink
rename isProduction param to isJSONFormatted
Browse files Browse the repository at this point in the history
  • Loading branch information
strobus committed Jan 15, 2021
1 parent 81601eb commit 6cfb7ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ func init() {
}

// New - Creates a new instance of logrus with customized configuration
func New(isProduction bool, logLevel string) *logrus.Logger {
func New(isJSONFormatted bool, logLevel string) *logrus.Logger {
var formatter logrus.Formatter

formatter = &logrus.TextFormatter{
ForceColors: true,
DisableLevelTruncation: true,
}

if isProduction {
if isJSONFormatted {
formatter = &logrus.JSONFormatter{}
}
log := logrus.New()
Expand Down

0 comments on commit 6cfb7ec

Please sign in to comment.