/**
* @return LoggerInterface
*/
- private static function getLogger()
+ private static function getInstance()
{
if (self::$type === self::TYPE_LOGGER) {
return DI::logger();
public static function enableWorker(string $functionName)
{
self::$type = self::TYPE_WORKER;
- self::getLogger()->setFunctionName($functionName);
+ self::getInstance()->setFunctionName($functionName);
}
/**
*/
public static function emergency(string $message, array $context = [])
{
- self::getLogger()->emergency($message, $context);
+ self::getInstance()->emergency($message, $context);
}
/**
*/
public static function alert(string $message, array $context = [])
{
- self::getLogger()->alert($message, $context);
+ self::getInstance()->alert($message, $context);
}
/**
*/
public static function critical(string $message, array $context = [])
{
- self::getLogger()->critical($message, $context);
+ self::getInstance()->critical($message, $context);
}
/**
*/
public static function error(string $message, array $context = [])
{
- self::getLogger()->error($message, $context);
+ self::getInstance()->error($message, $context);
}
/**
*/
public static function warning(string $message, array $context = [])
{
- self::getLogger()->warning($message, $context);
+ self::getInstance()->warning($message, $context);
}
/**
*/
public static function notice(string $message, array $context = [])
{
- self::getLogger()->notice($message, $context);
+ self::getInstance()->notice($message, $context);
}
/**
*/
public static function info(string $message, array $context = [])
{
- self::getLogger()->info($message, $context);
+ self::getInstance()->info($message, $context);
}
/**
*/
public static function debug(string $message, array $context = [])
{
- self::getLogger()->debug($message, $context);
+ self::getInstance()->debug($message, $context);
}
/**