title: Laravel 5.2 Monolog to output in Chrome console
body: <p>I'm trying to implement monolog so it outputs to chrome console.  So far I have this, but when I log a message it doesn't output anything.</p>
  
  <p>Is there anything else that needs to be done to make this work that I've missed?</p>
  
  <p>In the past in CakePHP or CodeIgniter I pulled in ChromePHP and output to the console by typing <code>ChromePhp::log();</code>, but it seems like Laravel has a much cleaner way of doing this using Monolog.</p>
  
  <p><strong>AppServiceProvider.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace TNC\Providers;
  
  use Log;
  use Monolog\Handler\ChromePHPHandler;
  use Monolog\Formatter\ChromePHPFormatter;
  use Illuminate\Support\ServiceProvider;
  
  class AppServiceProvider extends ServiceProvider
  {
      /**
       * Bootstrap any application services.
       *
       * @return void
       */
      public function boot()
      {
          Log::listen(function () {
  
              $monolog = Log::getMonolog();
  
              if (env('APP_ENV') === 'local') {
                  $monolog-&gt;pushHandler($chromeHandler = new ChromePHPHandler());
                  $chromeHandler-&gt;setFormatter(new ChromePHPFormatter());
              }
          });
      }
  
      /**
       * Register any application services.
       *
       * @return void
       */
      public function register()
      {
          //
      }
  }
  </code></pre>
  
  <p><strong>Route.php</strong></p>
  
  <pre><code>Route::get('/', function () {
  
      Log::info('General information log');
  
      return view('foundation.score');
  });
  </code></pre>