namespace Friendica\Core;
use Friendica\DI;
-use Friendica\Core\Logger\Type\WorkerLogger;
use Psr\Log\LoggerInterface;
/**
*/
class Logger
{
- /**
- * @return LoggerInterface|WorkerLogger
- */
- private static function getInstance()
+ private static function getInstance(): LoggerInterface
{
return DI::logger();
}
*/
public static function emergency(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->emergency($message, $context);
}
*/
public static function alert(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->alert($message, $context);
}
*/
public static function critical(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->critical($message, $context);
}
*/
public static function error(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->error($message, $context);
}
*/
public static function warning(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->warning($message, $context);
}
*/
public static function notice(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->notice($message, $context);
}
*/
public static function info(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->info($message, $context);
}
*/
public static function debug(string $message, array $context = [])
{
+ trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED);
+
self::getInstance()->debug($message, $context);
}
}