Add "error" logging level

-done
This commit is contained in:
Martin Konecny 2013-04-19 20:11:33 -04:00
parent f39f9329cc
commit 923f4ee180
1 changed files with 16 additions and 0 deletions

View File

@ -69,6 +69,22 @@ class Logging {
$logger->warn("[$file : $function() : line $line] - "
. self::toString($p_msg));
}
public static function error($p_msg)
{
$bt = debug_backtrace();
$caller = array_shift($bt);
$file = basename($caller['file']);
$line = $caller['line'];
$caller = array_shift($bt);
$function = $caller['function'];
$logger = self::getLogger();
$logger->err("[$file : $function() : line $line] - "
. self::toString($p_msg));
}
public static function debug($p_msg)
{