use Friendica\Core\Config;
use Friendica\Util\DateTimeFormat;
+use ReflectionClass;
/**
* @brief Logger functions
/**
* @brief Get class constants, and avoid using substring.
*/
- public function getConstants()
+ public static function getConstants()
{
- $reflectionClass = new ReflectionClass($this);
+ $reflectionClass = new ReflectionClass(__CLASS__);
return $reflectionClass->getConstants();
}
* @param string $msg
* @param int $level
*/
- public static function log($msg, $level = INFO)
+ public static function log($msg, $level = self::INFO)
{
$a = self::getApp();
return;
}
- if (count($levels) == 0)
+ if (count(self::$levels) == 0)
{
foreach (self::getConstants() as $k => $v)
{
* @param string $msg
* @param int $level
*/
- public static function devLog($msg, $level = INFO)
+ public static function devLog($msg, $level = self::INFO)
{
$a = self::getApp();
return;
}
- if (count($levels) == 0)
+ if (count(self::$levels) == 0)
{
foreach (self::getConstants() as $k => $v)
{