Logging to console in dev


I’m upgrading a lot of microservices from node-raven 0.12 to the latest - a lot has changed!

As we share the same raven settings across our apps we have a component which wraps raven https://www.npmjs.com/package/@financial-times/n-raven (hopefully it’s a public package). One of the main things it does is to differentiate between prod and dev, by exporting a dummy raven client in dev which simply logs to console.

Is this behaviour, or some other way of converting raven to a simple logging utility in dev, available in the latest version. I can’t see it documented, but maybe this is just the default behaviour now?

Hey @wheresrhys, you can achieve this behaviour using config below:

Raven.config('__DSN__', {
  dataCallback (data) {
    console.log(data) // or something more specific from the payload
  shouldSendCallback () {
    return false