Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Monolog\Logger::listen() #812

Closed
ultimateBusiness opened this issue Mar 23, 2018 · 8 comments
Closed

Call to undefined method Monolog\Logger::listen() #812

ultimateBusiness opened this issue Mar 23, 2018 · 8 comments
Labels

Comments

@ultimateBusiness
Copy link

Fresh project at L5.6 @ Homestead on a Mac - Package autodiscovery - no other configuration - open the site and the above error appears.

If I change in ".env" the entry:
LOG_CHANNEL=stack
to
LOG_CHANNEL=stac (yes - this is not valid)

Result => the Debugbar is working - any suggestions?

@ultimateBusiness
Copy link
Author

If I delete the hole entry "LOG_CHANNEL=stack" from .env will bring the same result.

@bilfeldt
Copy link

bilfeldt commented Apr 5, 2018

@ultimateBusiness did you manage to solve your issue?

@kylescousin
Copy link

kylescousin commented Apr 6, 2018

This has nothing to do with debugbar.

From the 5.6 upgrade guide https://laravel.com/docs/5.6/upgrade:

"All logging configuration is now housed in its own config/logging.php configuration file. You should place a copy of the default configuration file in your own application and tweak the settings based on your application's needs."

You need to copy that file in your config folder so you can use the default log channel: stack.

@bilfeldt
Copy link

bilfeldt commented Apr 6, 2018

I was able to locate the error to some incompatibility with debugbar and the package antonioribeiro/countries-laravel. See this issue for more details: antonioribeiro/countries-laravel#6

I don't know if the issue relies on debugbar or antonioribeiro/countries-laravel but would assume the latter.

@corazzi
Copy link

corazzi commented May 2, 2018

For anyone still having this issue, set 'log' => false in the collectors array in config/debugbar.php (logs is fine, note the 's').

The non-existent ::listen() method is being called here (LaravelDebugbar.php:244).

I'll try to get around to a PR at some point.

@zareismail
Copy link

laravel are using the Monolog\Logmanager for all loging drivers. monolog not have listene method. and debugbar has not updated for this log storing. so the debugbar is causing error.
solution:
\Config::set('debugbar.collectors.log', false);

@iz-ben
Copy link

iz-ben commented Jul 18, 2018

Using the comment by @bilfeldt I was able to narrow down the problem. Removing antonioribeiro/countries-laravel sorted out the problem

@stale
Copy link

stale bot commented Jul 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.

@stale stale bot added the stale label Jul 29, 2020
@stale stale bot closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants