It seems like Laravel doesn't log 404 exceptions by default.
I would like to log 404 errors to it's own log file. With everything I've found in the Docs and searches online, I have not been able to achieve any 404 errors logged, much less to their own log.
Create a Custom Log Channel:
In your config/logging.php configuration file, define a new log channel for 404 errors.
Use the Custom Log Channel:
In your application's exception handler (app/Exceptions/Handler.php), update the report method to log 404 exceptions to the newly created log channel:
Configure Logging Level: https://www.adpworkforce-now.com/
Make sure the logging level for the custom channel is set to 'error' or any appropriate level for 404 errors.
Clear Configuration Cache:
After making changes to your configuration files, clear the configuration cache using the command:
If you get this setup you will realise what a complete nightmare the internet is. Your logs will be absolutely full of requests for pages that have absolutely nothing to do with your site. Things like wordpress admin pages etc etc.
Any 404s that are genuinely for your app will be like less than 1% of requests and almost impossible to find in the noise.
If you want to gauge this, just have a look at your web server logs.
I've yet to find any legitimate reason to care about 404s