add alias method for compatibility with older Tlog
This commit is contained in:
@@ -229,6 +229,22 @@ class Tlog Implements LoggerInterface
|
||||
{
|
||||
$this->log(self::DEBUG, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of debug method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addDebug($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addDebug()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::DEBUG, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interesting events.
|
||||
@@ -244,6 +260,22 @@ class Tlog Implements LoggerInterface
|
||||
$this->log(self::INFO, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of info method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addInfo($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addInfo()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::INFO, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Normal but significant events.
|
||||
*
|
||||
@@ -255,6 +287,22 @@ class Tlog Implements LoggerInterface
|
||||
{
|
||||
$this->log(self::NOTICE, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of notice method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addNotice($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addNotice()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::NOTICE, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exceptional occurrences that are not errors.
|
||||
@@ -270,6 +318,22 @@ class Tlog Implements LoggerInterface
|
||||
{
|
||||
$this->log(self::WARNING, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of warning method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addWarning($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addWarning()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::WARNING, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runtime errors that do not require immediate action but should typically
|
||||
@@ -284,6 +348,22 @@ class Tlog Implements LoggerInterface
|
||||
$this->log(self::ERROR, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of error method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addError($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addError()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::ERROR, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see error()
|
||||
@@ -307,6 +387,22 @@ class Tlog Implements LoggerInterface
|
||||
$this->log(self::CRITICAL, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of critical method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addCritical($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addCritical()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::CRITICAL, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see critical()
|
||||
@@ -331,6 +427,22 @@ class Tlog Implements LoggerInterface
|
||||
$this->log(self::ALERT, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of alert method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addAlert($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addAlert()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::ALERT, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* System is unusable.
|
||||
*
|
||||
@@ -343,6 +455,22 @@ class Tlog Implements LoggerInterface
|
||||
$this->log(self::EMERGENCY, $message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Alias of emergency method. With this method you can put all parameter you want
|
||||
*
|
||||
* ex : Tlog::getInstance()->addEmergency($arg1, $arg2, $arg3);
|
||||
*
|
||||
*/
|
||||
public function addEmergency()
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
foreach ($args as $arg) {
|
||||
$this->log(self::EMERGENCY, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user