Skip to content

Commit

Permalink
set sentry.Logger only if debug enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn committed Apr 13, 2022
1 parent 56f8332 commit 7e4790f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func newReporter(cr *CmdRequest) (*Reporter, error) {
scope.SetExtra("command", cr.Command)
})

sentry.Logger = stdlog.Default()
if cr.Debug {
sentry.Logger = stdlog.Default()
}

return &Reporter{
sentryDSN: sentryDSN,
Expand Down

0 comments on commit 7e4790f

Please sign in to comment.