Skip to content

Commit

Permalink
overwrite sentry logger only if debugging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn committed Apr 13, 2022
1 parent e5e2301 commit 56f8332
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func newReporter(cr *CmdRequest) (*Reporter, error) {
},
}
sentryErr := sentry.Init(sentry.ClientOptions{
Debug: true,
Debug: cr.Debug,
HTTPTransport: transport,
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
log.Debug().Interface("event", event).Msg("sending event")
Expand All @@ -91,7 +91,6 @@ func newReporter(cr *CmdRequest) (*Reporter, error) {
scope.SetExtra("command", cr.Command)
})


sentry.Logger = stdlog.Default()

return &Reporter{
Expand Down

0 comments on commit 56f8332

Please sign in to comment.