From: Philipp Date: Sun, 16 Jul 2023 23:41:02 +0000 (+0200) Subject: Remove unused ProfilerLogger factory X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3a0c18713e5c83824a410547c6c7fd804220f1d1;p=friendica.git Remove unused ProfilerLogger factory --- 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' => [