Search code examples
laravellaravel-4error-logging

How do I prevent Laravel from logging 404 errors?


My production laravel log is getting stuffed with 404 errors from bots and the like. I want to be able to review my log daily for real errors, but it's impossible to sort through all of this.

What I would prefer is to log everything except 404 errors. Everything else I want to see. What is the best practice for accomplishing this?


Solution

  • You may use the App::missing() function to catch the error and display a 404 page

    http://laravel.com/docs/4.2/errors