Skip to content

Commit

Permalink
change the default log output format
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Sep 6, 2017
1 parent 808e370 commit f1b8c64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/jira/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ import (

var (
log = logging.MustGetLogger("jira")
defaultFormat = "%{color}%{time:2006-01-02T15:04:05.000Z07:00} %{level:-5s} [%{shortfile}]%{color:reset} %{message}"
defaultFormat = func() string {
format := os.Getenv("JIRA_LOG_FORMAT")
if format != "" {
return format
}
return "%{color}%{level:-5s}%{color:reset} %{message}"
}()
)

func handleExit() {
Expand Down

0 comments on commit f1b8c64

Please sign in to comment.