Skip to content

Commit

Permalink
disable timestamps in regular logging, enable full timestamp logging …
Browse files Browse the repository at this point in the history
…in debug mode
  • Loading branch information
janosmiko committed Jul 14, 2022
1 parent 0f329d5 commit 447bc32
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ func setLogLevel() {
DisableColors: viper.GetBool("disable_colors"),
ForceColors: true,
DisableLevelTruncation: true,
FullTimestamp: viper.GetBool("full_timestamp"),
FullTimestamp: true,
DisableTimestamp: !viper.GetBool("debug"),
QuoteEmptyFields: true,
CallerPrettyfier: func(f *runtime.Frame) (string, string) {
filename := strings.ReplaceAll(path.Base(f.File), "github.com/rewardenv/reward/", "")
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/gogo/protobuf v1.2.1 // indirect
github.com/golang/protobuf v1.3.4 // indirect
github.com/google/go-cmp v0.5.4 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
Expand Down
3 changes: 0 additions & 3 deletions internal/commands/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ const defaultConfig = `---
# Logging level, can be: trace, debug, info, warn, error
log_level: info
# Enable or disable full timestamps in the command command output
full_timestamp: false
# Enable debugging (set log level to debug). Can be used as environment variable too.
# eg: DEBUG=true reward env up
debug: false
Expand Down

0 comments on commit 447bc32

Please sign in to comment.