Skip to content

Commit

Permalink
Refactor logging statements in main.go to use a custom log format
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptofyre committed Sep 22, 2024
1 parent 00be378 commit ef6f2b4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ func init() {
// Initialize logger
logger = logrus.New()
logger.SetFormatter(&logrus.TextFormatter{
FullTimestamp: true,
FullTimestamp: true,
TimestampFormat: "2006-01-02 - 15:04:05",
DisableSorting: true,
ForceQuote: false,
DisableQuote: true,
ForceColors: true,
FieldMap: logrus.FieldMap{
logrus.FieldKeyTime: "time",
logrus.FieldKeyLevel: "level ",
logrus.FieldKeyMsg: "message",
},
})

// Get the directory of the executable
Expand Down

0 comments on commit ef6f2b4

Please sign in to comment.