Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kakkeroth's avatar

[5.6] Laravel logging not working anymore?

Hello everybody,

I have recently upgraded to Laravel 5.6 (from 5.5) and I'm running into an issue where my the \Log() class doesn't work anymore.

At first it gave me the following error:

laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/Code/grotesmurf/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)

which was caused by me not having the new /config/logging.php file, so that issue has been solved, but not that I do have the file, there are no new log entries created anymore at all, with the emergency error it atleast did output my logs.

I've tried using stack, single & daily as the LOG_CHANNEL, but to no avail.

I've temporarily set the permissions to 777 just to test if it was a permission error, but that's not the case. Setting it to 5xx causes a permission error, so it does actually try to access the file.

The command I'm running to test is just a simple \Log::info('hello') command inside of Laravel Tinker.

I'm running on php version 7.1.6.1 inside a vagrant box.

I've tried researching google about what's happening but all cases I've found either told me the OP to clear all cache or to add the logging.php file.

Hope anyone could give some suggestions on how to solve this issue.

Thanks in advance.

P.S. if you want more info, just ask :-)

0 likes
3 replies
kakkeroth's avatar

I marked your answer as the correct one, but I forgot I had disabled the logging.php file so I could continue testing, so it made a log entry but it still contained the emergency error..

While the upgrade guide did make me remove the log & log_level key out of the config/app.php file, it does actually not solve my issue and the same problem of no log entry being created persists..

kakkeroth's avatar
kakkeroth
OP
Best Answer
Level 1

Well I have found the issue.

My application uses an adjusted storage_path() method and since the new Logger uses the storage_path() method to generate it's filepath, it caused the log file to be generated in a different directory than storage/logs.

1 like

Please or to participate in this conversation.