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

[Laravel 5.6] Call to undefined method Monolog\Logger::getMonolog() #789

Closed
sweebee opened this issue Feb 11, 2018 · 17 comments
Closed

[Laravel 5.6] Call to undefined method Monolog\Logger::getMonolog() #789

sweebee opened this issue Feb 11, 2018 · 17 comments
Labels

Comments

@sweebee
Copy link

sweebee commented Feb 11, 2018

On Laravel 5.6 I get this error.

Call to undefined method Monolog\Logger::getMonolog()
@talvbansal
Copy link

I have the same error too!

@micaelmmendes
Copy link

micaelmmendes commented Feb 14, 2018

I get this same error just after installing the debugbar via composer and running my app in the browser.

@garygreen
Copy link

Same problem.

@denimpax
Copy link

@garygreen, check app/Exceptions/Handler.php.
getMonolog maybe called from report method for slack handler or other

@kingflamez
Copy link

I also got this error, any solution?

@shaband
Copy link

shaband commented Feb 24, 2018

i have changed
'collectors'=>[
...............
'log' => false,
..............
]
in \config\debugbar.php
and it works well

@gattytto
Copy link

gattytto commented Mar 1, 2018

I do not have the debugbar package in my composer.json project, still:

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

In Logger.php line 276:
                                                         
  Call to undefined method Monolog\Logger::getMonolog() 

@rygilles
Copy link

rygilles commented Mar 1, 2018

Same here...

@rygilles
Copy link

rygilles commented Mar 1, 2018

Ok, just find out what's wrong in my laravel project : Using Logentries in my AppServiceProvider register method.

Some clues :

  1. Try to disable thirds party tools in this method.
  2. Check your error handler content (App\Exceptions\Handler)
  3. Check the "logging" part on this document if you are upgrading : https://laravel.com/docs/5.6/upgrade

@gattytto
Copy link

gattytto commented Mar 1, 2018

I did a composer cleancache and deleted vendor/* -rf.. then edited composer.json to use laravel/[email protected].*, minimum stability is dev, still composer fetches a wrong Illuminate Logger code, which calls that function that seems to not exist anymore..

worth noticing I added the missing .env and logging.php new entries for this laravel upgrade, I still get the old version of the logger.php Illuminate, which makes that wrong call

@aseland123
Copy link

In Laravel 5.6
Logger::getMonolog() does not exist. you may try Logger::getLogger()

@insign
Copy link

insign commented Dec 13, 2018

I used Log::getLogger() and worked fine.

@XBS-Nathan
Copy link

I know this is an old issue, but i found by deleting/updating the debug configuration file in app/config/debugbar.php resolved this one for me

@NguyenNhutTien
Copy link

In Laravel 5.6
Logger::getMonolog() does not exist. you may try Logger::getLogger()

Thank you

@Heruvim6w
Copy link

In Laravel 5.6
Logger::getMonolog() does not exist. you may try Logger::getLogger()

But how can I update this string:
"$this->addCollector(new MonologCollector($this->app['log']->getMonolog()))"
in app/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php?

@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 5, 2020
@BFRS01904
Copy link

I'm still getting this error using laravel 6 ;(

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