lundi 31 décembre 2018

Setting up Chrome Logger Using Laravel Isn't Working

I'm trying to set up Chrome Logger to use alongside Laravel as detailed in "Easy Laravel 5", however following the instructions throws errors, and I'm new to Laravel (and not very experienced in PHP), so I'm not sure how to resolve them. We are directed to add a piece of code to the bootstrap/app.php file to use the chrome logger in the book.

The following is a screenshot of the error screen: Error Screen

The following is the site without the code excerpt:
Default Screen

I tried requiring the chrome.php file using require_once() in the app.php file, but the error still persists. Removing the code excerpt produces the default screen.

This is the code excerpt:
ChromePHP include code

if ($app->environment('local')) 
{
    $app->configureMonologUsing(function($monolog)
    {
          $monolog->pushHandler(new  \Monolog\Handler\ChromePHPHandler());
    });
}

I expected to be able to use the chrome logger, but instead receive the aforementioned error screen.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire