Skip to content

Commit

Permalink
Make sure configuration values are set
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Feb 13, 2020
1 parent cec4095 commit d055608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ func main() {
log.Fatal(err)
}

if cfg.Logging != nil {
if cfg.Logging != nil && cfg.Logging.Level != "" {
l, err := log.ParseLevel(cfg.Logging.Level)
if err != nil {
log.Fatal(err)
}
log.SetLevel(l)
}

if cfg.Rollbar != nil {
if cfg.Rollbar != nil && cfg.Rollbar.AccessToken != "" {
rollbar.SetStackTracer(errors.StackTracer)
rollrus.SetupLogging(cfg.Rollbar.AccessToken, cfg.Rollbar.Environment)
defer rollrus.ReportPanic(cfg.Rollbar.AccessToken, cfg.Rollbar.Environment)
Expand Down

0 comments on commit d055608

Please sign in to comment.