mattrobenolt/raven-node — pull request #13 by bcherry (2012-07-31 00:21:32+00:00)
Title: Add a "silent" option for test/development

This change adds a simple "silent" mode, as described by Issue #12 from @zzen.

You simply pass `{ silent: true }` into the Client constructor, and it will swallow two things: The failure to find/parse the DSN (because you have no DSN), and the failure to run in NODE_ENV='production'. I'm using a dummy dsn object to avoid later failures down the pipe (since `captureMessage`, for instance, returns an object even if it's disabled and I didn't want to change that).

In practice, just add the `{ silent: true }` flag if you're using Raven in a development server or test harness and don't want to see extra log messages appear, and don't want to add extra logic and branching to avoid using it.

Might not be the cleanest implementation, but it gets the job done.