From 2ddc9496e9403a59a87b644d1c2b9a106b773e46 Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Thu, 5 Aug 2010 10:08:33 -0400
Subject: Added an optional second parameter to show_404() to
disable logging.
---
user_guide/changelog.html | 1 +
user_guide/general/errors.html | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
(limited to 'user_guide')
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 714e9e86e..ce017c9fd 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -132,6 +132,7 @@ Hg Tag:
Other Changes
+ - Added an optional second parameter to show_404() to disable logging.
- Updated loader to automatically apply the sub-class prefix as an option when loading classes. Class names can be prefixed with the standard "CI_" or the same prefix as the subclass prefix, or no prefix at all.
- Increased randomness with is_really_writable() to avoid file collisions when hundreds or thousands of requests occur at once.
- Switched some DIR_WRITE_MODE constant uses to FILE_WRITE_MODE where files and not directories are being operated on.
diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html
index 7c585d1b9..5bd5011ae 100644
--- a/user_guide/general/errors.html
+++ b/user_guide/general/errors.html
@@ -76,13 +76,15 @@ about class/function scoping.
application/errors/error_general.php
The optional parameter $status_code determines what HTTP status code should be sent with the error.
-show_404('page')
+show_404('page' [, 'log_error'])
This function will display the 404 error message supplied to it using the following error template:
application/errors/error_404.php
The function expects the string passed to it to be the file path to the page that isn't found.
Note that CodeIgniter automatically shows 404 messages if controllers are not found.
+CodeIgniter automatically logs any show_404() calls. Setting the optional second parameter to FALSE will skip logging.
+
log_message('level', 'message')
--
cgit v1.2.3-24-g4f1b