From 32f2fd6f30edc0d395b47343a2a43c0db752869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 20 Jun 2014 10:56:15 +0200 Subject: [PATCH] logger convenience methods --- application/core/Logger.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/application/core/Logger.php b/application/core/Logger.php index 8ee7042d..3726c47f 100644 --- a/application/core/Logger.php +++ b/application/core/Logger.php @@ -68,4 +68,28 @@ class Logger { } echo $message; } + + /** + * Log and echo the given Info Message + * + * @param string $message + * @param bool $eol + * @param bool $output + */ + public static function logInfo($message, $eol = true, $output = true) { + $message = '[INFO] ' . $message; + self::log($message, $eol, $output); + } + + /** + * Log and echo the given Warning Message + * + * @param string $message + * @param bool $eol + * @param bool $output + */ + public static function logWarning($message, $eol = true, $output = true) { + $message = '[WARNING] ' . $message; + self::log($message, $eol, $output); + } }