I have logging enabled by default on Laravel 5.5.
The settings are:
In config/app.php
file:
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
In .env
file:
APP_LOG_LEVEL=debug
If any error happens on the application, I can see the exception page. But I don't see it in the log file anymore. It was working fine a couple of months ago. Even when I try to log manually, it does not log it.
Log::debug('Notification');
I have code to create files using Storage
and it's working fine. So, I don't think it's some permission issue. What could be the reason behind this?
Try
php artisan config:cache
If the issue is related to laravel application cache, then the artisan command will help to cache all your config files ( with current changes ) into a single file. In laravel the config values are obtain from the application cache, so you've to run this command whenever you change the config files. To update the application cache with the latest changes.
If the issue is not related to application cache, you can track the real cause using the apache2 error logs.
tail -f /var/log/apache2/error.log
Might be you have given permission and ownership to storage folder not insider folders like: taking case on redhat, because in case of redhat apache user is apache and in case of debian or most other www-data
folder | Permission | ownership
storage | 775 | root:apache
storage/logs | 755 | root:apache
storage/logs | 775 | root:root
It should be minimum
storage/logs | 775 | root:apache
or
storage/logs | 755 | apache:apache
and please check once with APP_DEBUG=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With