Skip to content

Commit

Permalink
Move log listener registration to register()
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed May 30, 2015
1 parent 0e9d97c commit d2142e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/RavenServiceProvider.php
Expand Up @@ -21,13 +21,7 @@ class RavenServiceProvider extends ServiceProvider {
*/
public function boot()
{
$app = $this->app;

// Listen to log messages.
$app['log']->listen(function ($level, $message, $context) use ($app)
{
$app['raven.handler']->log($level, $message, $context);
});
// Nothing.
}

/**
Expand Down Expand Up @@ -66,6 +60,12 @@ public function register()
return new RavenLogHandler($app['raven.client'], $app, $level);
});

// Listen to log messages.
$this->app['log']->listen(function ($level, $message, $context) use ($app)
{
$app['raven.handler']->log($level, $message, $context);
});

// Register the fatal error handler.
register_shutdown_function(function () use ($app)
{
Expand Down

0 comments on commit d2142e1

Please sign in to comment.