Closed jamesnicholls closed 3 years ago
Thank you for opening this issue @jamesnicholls
I suggest either:
* amending the `consoleonly` `logLevel` setting so that it also logs errors to the console, or;
This is the option I would go with 👍
I'm happy to review any pull-requests for this feature :-)
this was done in https://github.com/Financial-Times/o-errors/pull/118
What
Implement a configuration setting (or extend the
logLevel
setting) that, when switched on/off, logs errors to the console instead of sending them to Sentry.Details
The US Growth team recently implemented
o-errors
into an application. During development and testing, we wanted to see the errors logged to the browser's console rather than sending errors to Sentry. We thought setting thelogLevel
toconsoleonly
would achieve this. While this setting does prevent errors being sent to Sentry, the errors aren't logged to the console (the setting replaces theraven
methods with no-ops).Other values for the
logLevel
setting only affecto-errors
logging methods, which makes thelogLevel
setting a little inconsistent and confusing to use.I suggest either:
consoleonly
logLevel
setting so that it also logs errors to the console, or;Additional information
I've spoken to @JakeChampion about this already: https://financialtimes.slack.com/archives/C02FU5ARJ/p1610984259006200.
I'm also happy to submit a PR to implement this feature but I would appreciate some guidance on which of the two options above you think would be better.