Skip to content

Commit

Permalink
added log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Sep 7, 2023
1 parent 05e9af8 commit 07e9a31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ func main() {
// - logrus to
func setupTelemetry() {
environment := "development"
log.SetLevel(log.TraceLevel)
if env.IsProd() {
log.SetLevel(log.InfoLevel)
environment = "production"
log.SetFormatter(&log.JSONFormatter{}) // simpler to query but harder to parse in the console
}
Expand Down

0 comments on commit 07e9a31

Please sign in to comment.