Add support for WorkerLogger decorator in LoggerManager, deprecate core Logger class, deprecate DI::workerLogger()
This commit is contained in:
parent
0804413c41
commit
510f4e02c8
5 changed files with 76 additions and 21 deletions
|
|
@ -9,6 +9,7 @@ namespace Friendica;
|
|||
|
||||
use Dice\Dice;
|
||||
use Friendica\Core\Logger\Capability\ICheckLoggerSettings;
|
||||
use Friendica\Core\Logger\LoggerManager;
|
||||
use Friendica\Core\Logger\Util\LoggerSettingsCheck;
|
||||
use Friendica\Core\Session\Capability\IHandleSessions;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
|
|
@ -324,6 +325,8 @@ abstract class DI
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated 2025.02 Use `DI::loggerManager()` and `DI::logger()` instead
|
||||
*
|
||||
* @return \Friendica\Core\Logger\Type\WorkerLogger
|
||||
*/
|
||||
public static function workerLogger()
|
||||
|
|
@ -331,6 +334,11 @@ abstract class DI
|
|||
return self::$dice->create(Core\Logger\Type\WorkerLogger::class);
|
||||
}
|
||||
|
||||
public static function loggerManager(): LoggerManager
|
||||
{
|
||||
return self::$dice->create(LoggerManager::class);
|
||||
}
|
||||
|
||||
//
|
||||
// "Factory" namespace instances
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue