diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb7c0c61..ee47c0fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # In2publish Core Change Log +15.5.4: +- [BUGFIX] Enable Logging in Command on foreign +- [BUGFIX] LogLevel is evaluated correctly + 12.5.3: - [CODESTYLE] Make qa happy diff --git a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php index 520bc03b3..4993da91e 100644 --- a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php +++ b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php @@ -32,7 +32,8 @@ use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Model\Task\AbstractTask; use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Repository\TaskRepositoryInjection; use In2code\In2publishCore\Service\Context\ContextServiceInjection; -use Psr\Log\LoggerInterface; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -46,21 +47,14 @@ use const JSON_THROW_ON_ERROR; -class RunTasksInQueueCommand extends Command +class RunTasksInQueueCommand extends Command implements LoggerAwareInterface { use ContextServiceInjection; use TaskRepositoryInjection; + use LoggerAwareTrait; public const IDENTIFIER = 'in2publish_core:publishtasksrunner:runtasksinqueue'; - protected ?LoggerInterface $logger = null; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - parent::__construct(); - } - public function isEnabled(): bool { return $this->contextService->isForeign(); diff --git a/Classes/Utility/LogUtility.php b/Classes/Utility/LogUtility.php index 5e1f0afa3..dc5e56ae9 100644 --- a/Classes/Utility/LogUtility.php +++ b/Classes/Utility/LogUtility.php @@ -27,14 +27,14 @@ * This copyright notice MUST APPEAR in all copies of the script! */ -use Psr\Log\LogLevel; +use TYPO3\CMS\Core\Log\LogLevel; use TYPO3\CMS\Core\Messaging\AbstractMessage; class LogUtility { public static function translateLogLevelToSeverity(int $logLevel): int { - switch ($logLevel) { + switch (LogLevel::getInternalName($logLevel)) { case LogLevel::DEBUG: $severity = AbstractMessage::NOTICE; break; diff --git a/Configuration/Component/PostPublishTaskExecution/ForeignServices.php b/Configuration/Component/PostPublishTaskExecution/ForeignServices.php index e9eaca3b6..cdca0a5b7 100644 --- a/Configuration/Component/PostPublishTaskExecution/ForeignServices.php +++ b/Configuration/Component/PostPublishTaskExecution/ForeignServices.php @@ -25,6 +25,5 @@ 'hidden' => true, 'schedulable' => false, ], - ) - ->public(); + ); }; diff --git a/ext_emconf.php b/ext_emconf.php index 1e8acc85f..7721d7af1 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ 'title' => 'in2publish Core', 'description' => 'Content publishing extension to connect stage and production server', 'category' => 'plugin', - 'version' => '12.5.3', + 'version' => '12.5.4', 'state' => 'stable', 'clearCacheOnLoad' => true, 'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',