Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

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 12:50AM
    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 12:50AM
    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 12:50AM
    Try now.
  • edited 12:50AM
    Thanks
Sign In or Register to comment.