burningmoth / burningmoth-chromelogger-firefox

WebExtension implementing Chrome Logger protocol for Firefox
15 stars 12 forks source link

Chrome Logger in Laravel does not show up in console log in Firefox Quantum 61.0 #3

Closed khe817 closed 6 years ago

khe817 commented 6 years ago

I could see X-ChromeLogger-Data in the header, but Chrome Logger in Laravel does not show up in console log in Firefox Quantum 61.0.

I know the ChromePhp from server side works because the Chrome Logger in Chrome browser shows the logs.

I used this configuration to enable Chrome Logger in Laravel 5:

\Log::listen(function () {
    $monolog = \Log::getMonolog();
    $monolog->pushHandler($chromeHandler = new \Monolog\Handler\ChromePHPHandler());
    $chromeHandler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter());
});
khe817 commented 6 years ago

I included ChromePhp directly to the Laravel project ($ composer require ccampbell/chromephp) instead of registering it with the Log, and it worked.

I am sorry for the hassle!