Skip to content

Commit

Permalink
add json log format
Browse files Browse the repository at this point in the history
  • Loading branch information
Устюжанин Антон Александрович committed Jul 25, 2020
1 parent 5a4827e commit 37dfa75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/promxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,10 @@ func main() {
logrus.SetLevel(level)

var formatter logrus.Formatter
if opts.LogFormat == "json" {
switch opts.LogFormat {
case "json":
formatter = &logrus.JSONFormatter{}
} else {
default:
// Set the log format to have a reasonable timestamp
formatter = &logrus.TextFormatter{
FullTimestamp: true,
Expand Down

0 comments on commit 37dfa75

Please sign in to comment.