I am using my local Mac machine to develop a Laravel app; while running some tests I have some lines in my code to store values in my Log file like this:
Log::debug('Have reached command with the following ID: ' . $post_id);
My .env file contents
APP_DEBUG=true
APP_LOG=daily
LOG_CHANNEL=stack
LOG_LEVEL=debug
When the method runs, no errors are returned (in debug mode, so any errors should be shown).
When I navigate to /storage/logs/ nothing is found.
Can someone explain what might be the cause of this? I have already chmod'ed the log directory to 755.
I'd configure Monolog in config/logging.php: https://stackoverflow.com/a/51816907/549372 ...while your config might be cached - and therefore it might not pick up recent changes, until it had been re-cached with php artisan config:clear && php artisan config:cache. I think for storage facilities there's also a php artisan command. For logs there's php artisan tail.
Use ls -la and/or chown -R user:group ./storage/logs to ensure that the owner's user & group is apache or www-data (whatever this may be on your system), because the digits of the octal permissions are always relative to the owner's group/user; then it could even be set to 600.
The default .env has no APP_LOG either.