How can I get the URL in the error log for 404s?

edited April 2014 in Feature Requests
I hate getting 404's and not knowing what URL the vistor was trying to get to. What can I adjust/extend so ALL 404 error logs will include the URL?

Comments

  • edited 3:02PM
    Ha... I didn't even no that parameter existed for logging. I've posted an update to the develop branch so that the redirect_404() function call will automatically log the URI path before redirecting (this function will first check for a redirect before showing a 404). Alternatively, you could could overwrite the show_404 function by adding to you my_helper.php file:
    function show_404($page = '', $log_error = TRUE) { if (empty($page)) $page = uri_string(); $_error =& load_class('Exceptions', 'core'); $_error->show_404($page, $log_error); exit; }
  • edited 3:02PM
    Thanks! The helper code made the system angry, so I added the code to core/Exceptions.php for now.

    I didn't see a commit in the development branch with the change.
  • edited 3:02PM
    Try now.
  • edited 3:02PM
    Thanks
Sign In or Register to comment.