Added an optional second parameter to <kbd>show_404()</kbd> to disable logging.
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index 503015d..419ea2b 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -88,12 +88,17 @@
* @param string
* @return string
*/
- function show_404($page = '')
+ function show_404($page = '', $log_error = TRUE)
{
$heading = "404 Page Not Found";
$message = "The page you requested was not found.";
- log_message('error', '404 Page Not Found --> '.$page);
+ // By default we log this, but allow a dev to skip it
+ if ($log_error)
+ {
+ log_message('error', '404 Page Not Found --> '.$page);
+ }
+
echo $this->show_error($heading, $message, 'error_404', 404);
exit;
}