Added warning method. Changed some code to use it.
This commit is contained in:
parent
1a13731216
commit
7aba1dcebd
|
@ -51,6 +51,21 @@ class Logging {
|
|||
$logger = self::getLogger();
|
||||
$logger->info("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function warn($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->info("[$file : $function() : line $line] [WARN] - ".self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function debug($p_msg)
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ class Application_Model_StoredFile
|
|||
if (defined($mdConst)) {
|
||||
$dbMd[constant($mdConst)] = $mdValue;
|
||||
} else {
|
||||
Logging::info("Warning: using metadata that is not defined.
|
||||
Logging::warn("using metadata that is not defined.
|
||||
[$mdConst] => [$mdValue]");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue