On Laravel 5.6 I get this error.
Call to undefined method Monolog\Logger::getMonolog()
I have the same error too!
I get this same error just after installing the debugbar via composer and running my app in the browser.
Same problem.
@garygreen, check app/Exceptions/Handler.php.
getMonolog maybe called from report method for slack handler or other
I also got this error, any solution?
i have changed
'collectors'=>[
...............
'log' => false,
..............
]
in configdebugbar.php
and it works well
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()
Same here...
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 (AppExceptionsHandler)
3) Check the "logging" part on this document if you are upgrading : https://laravel.com/docs/5.6/upgrade
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
In Laravel 5.6
Logger::getMonolog() does not exist. you may try Logger::getLogger()
I used Log::getLogger() and worked fine.
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
In Laravel 5.6
Logger::getMonolog()does not exist. you may tryLogger::getLogger()
Thank you
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?
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.
Most helpful comment
In Laravel 5.6
Logger::getMonolog()does not exist. you may tryLogger::getLogger()