aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-16 19:43:17 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-16 19:43:17 +0100
commit996c387f50f9b65f271b3cd13b9d63165236b6d2 (patch)
treefaa2246d983e14613c5b01551f3b1fb776e5ec96 /lib
parent19fb901cb417c13be0ac3019d1bb1e7b09d08b37 (diff)
Add some helpers to Minz_Log class
Add following methods: - Minz_Log::debug($msg) - Minz_Log::notice($msg) - Minz_Log::warning($msg) - Minz_Log::error($msg)
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Log.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Minz/Log.php b/lib/Minz/Log.php
index e710aad4a..d3eaec2ae 100644
--- a/lib/Minz/Log.php
+++ b/lib/Minz/Log.php
@@ -80,4 +80,21 @@ class Minz_Log {
self::record($msg_get, Minz_Log::DEBUG, $file_name);
self::record($msg_post, Minz_Log::DEBUG, $file_name);
}
+
+ /**
+ * Some helpers to Minz_Log::record() method
+ * Parameters are the same of those of the record() method.
+ */
+ public static function debug($msg, $file_name = null) {
+ self::record($msg, Minz_Log::DEBUG, $file_name);
+ }
+ public static function notice($msg, $file_name = null) {
+ self::record($msg, Minz_Log::NOTICE, $file_name);
+ }
+ public static function warning($msg, $file_name = null) {
+ self::record($msg, Minz_Log::WARNING, $file_name);
+ }
+ public static function error($msg, $file_name = null) {
+ self::record($msg, Minz_Log::ERROR, $file_name);
+ }
}