From 3a0c18713e5c83824a410547c6c7fd804220f1d1 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 17 Jul 2023 01:41:02 +0200 Subject: [PATCH] Remove unused ProfilerLogger factory --- src/Core/Logger/Factory/ProfilerLogger.php | 53 ---------------------- static/dependencies.config.php | 6 --- 2 files changed, 59 deletions(-) delete mode 100644 src/Core/Logger/Factory/ProfilerLogger.php diff --git a/src/Core/Logger/Factory/ProfilerLogger.php b/src/Core/Logger/Factory/ProfilerLogger.php deleted file mode 100644 index 8c07b51b61..0000000000 --- a/src/Core/Logger/Factory/ProfilerLogger.php +++ /dev/null @@ -1,53 +0,0 @@ -. - * - */ - -namespace Friendica\Core\Logger\Factory; - -use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\Logger\Type\ProfilerLogger as ProfilerLoggerClass; -use Friendica\Util\Profiler; -use Psr\Log\LoggerInterface; - -/** - * The logger factory for the ProfilerLogger - * - * @see ProfilerLoggerClass - */ -class ProfilerLogger extends AbstractLoggerTypeFactory -{ - /** - * Wraps a given Logger with profiling information in case profiling is enabled - * - * @param IManageConfigValues $config The system configuration - * @param LoggerInterface $logger The given logger class, which should get wrapped - * @param Profiler $profiler The profiler utility - * - * @return LoggerInterface The PSR-3 compliant logger instance - */ - public function create(IManageConfigValues $config, LoggerInterface $logger, Profiler $profiler): LoggerInterface - { - if ($config->get('system', 'profiling') ?? false) { - return $logger; - } else { - return new ProfilerLoggerClass($logger, $profiler); - } - } -} diff --git a/static/dependencies.config.php b/static/dependencies.config.php index 2b246f8452..ce8a5bd9df 100644 --- a/static/dependencies.config.php +++ b/static/dependencies.config.php @@ -198,12 +198,6 @@ return [ ['create', [], Dice::CHAIN_CALL], ], ], - \Friendica\Core\Logger\Type\ProfilerLogger::class => [ - 'instanceOf' => \Friendica\Core\Logger\Factory\ProfilerLogger::class, - 'call' => [ - ['create', [], Dice::CHAIN_CALL], - ], - ], \Friendica\Core\Logger\Capabilities\IHaveCallIntrospections::class => [ 'instanceOf' => \Friendica\Core\Logger\Util\Introspection::class, 'constructParams' => [