I'd like to be able to disable the following logging message that I get when I disable reporting via releaseStage/notifyReleaseStages:
Session not sent due to releaseStage/notifyReleaseStages configuration
I am not sure how to do this.
releaseStage/notifyReleaseStages.4.7.2
Thanks!
Hi @waynebloss, you can set logger: null in your configuration to switch off logging:
https://docs.bugsnag.com/platforms/browsers/js/configuration-options/#logger
Let me know if you need anything else!
But that will disable all logging. What if I want to disable those diagnostic errors?
We don't have granular configuration for every kind of log message. If you opt in to logging you get them all. That particular log message is a warn() so you could provide a custom logger that only logs error level.
function noop () {}
var logger = {
debug: noop,
info: noop,
warn: noop,
error: function () { console.log.apply(console, arguments) }
}
bugsnag({
logger: logger
})
That is just one example. You could get more creative and filter out just the messages you don't want to see and continue to include debug/info logs. It's up to you!
Hope this helps.
Most helpful comment
Hi @waynebloss, you can set
logger: nullin your configuration to switch off logging:https://docs.bugsnag.com/platforms/browsers/js/configuration-options/#logger
Let me know if you need anything else!