From 874c375881f10272fc82e58f815d3788c584ad4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20E=C3=9Fl?= <indy.essl@gmail.com> Date: Thu, 5 Mar 2020 19:19:41 +0100 Subject: [PATCH] [TASK] Disable InMemoryLogWriter in CLI mode Do not register InMemoryLogWriter in cli mode, as it is not needed here or used later in any way, and will just fill up the memory and slow down the script execution, if many log messages are written to it. Resolves: #89928 Releases: master, 9.5 Change-Id: I6500fe8a1ba534a669ee1a6b8a4df0857be54e38 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63555 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Susanne Moog <look@susi.dev> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Susanne Moog <look@susi.dev> Reviewed-by: Benni Mack <benni@typo3.org> --- typo3/sysext/adminpanel/ext_localconf.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/adminpanel/ext_localconf.php b/typo3/sysext/adminpanel/ext_localconf.php index e92f01dd44f4..12d68037077b 100644 --- a/typo3/sysext/adminpanel/ext_localconf.php +++ b/typo3/sysext/adminpanel/ext_localconf.php @@ -61,7 +61,10 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [ $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['adminPanel_save'] = \TYPO3\CMS\Adminpanel\Controller\AjaxController::class . '::saveDataAction'; -$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG][\TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter::class] = []; +// Only write to InMemoryLog if in frontend and not in CLI mode +if (TYPO3_MODE === 'FE' && !\TYPO3\CMS\Core\Core\Environment::isCli()) { + $GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][\TYPO3\CMS\Core\Log\LogLevel::DEBUG][\TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter::class] = []; +} if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['adminpanel_requestcache'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['adminpanel_requestcache'] = []; -- GitLab