Goal
We want to consolidate error reporting from Nasqueron applications.
Plan
Plan is to:
- add Raven as dep
- require a sentry DSN in the configuration
- if provided, add a Raven handler to the logging component
Code sample
The following snippet code is offered by the Sentry dashboard (I'm adding the use ($dsn)):
$dsn = …; $app->configureMonologUsing(function($monolog) use ($dsn) { $client = new Raven_Client($dsn); $handler = new Monolog\Handler\RavenHandler($client); $handler->setFormatter(new Monolog\Formatter\LineFormatter("%message% %context% %extra%\n")); $monolog->pushHandler($handler); });