Silent mode for local execution?
Hi,
when playing within local environment, ie. running tests, plenty of:
console.warn
Sentry disabled in local environment.
usually appear making the test output effectively unreadable. Maybe we could introduce some kind of a silent mode, where these warnings are disabled?
Thanks for your suggestion. That would certainly make sense.
As a workaround, for local testing, you can redefine console.warn as an empty function:
console.log = () => {}; // mute console output for simpler test logs
console.error = () => {};
console.warn = () => {};
console.info = () => {};
console.debug = () => {};
This would disable all console output of the lib while the regular Mocha or Jest output should still work as expected.
Thanks for reply.
Yeah, that's an option, however this is a global solution and will override the default behavior for any use of ie. console.warn. Since usage of ENV variables here is wide, maybe another one like SENTRY_SILENT_MODE would not be considered harmful?