Steps to reproduce¶
Add some log calls to a file:
$logger = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__);
$logger->error('my-error');
$logger->debug('my-debug');
Configure logging:
$TYPO3_CONF_VARS['LOG']['writerConfiguration'] = array(
\TYPO3\CMS\Core\Log\LogLevel::ERROR => array(
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => array(
'logFile' => 'typo3temp/logs/error.log'
),
),
\TYPO3\CMS\Core\Log\LogLevel::DEBUG => array(
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => array(
'logFile' => 'typo3temp/logs/debug.log'
),
),
);
Expected result¶
$ cat typo3temp/logs/debug.log
Thu, 06 Jun 2013 16:29:20 +0200 [ERROR] request="51b09cbec1156" component="...": my-error
Thu, 06 Jun 2013 16:29:20 +0200 [DEBUG] request="51b09cbec1156" component="...": my-debug
$ cat typo3temp/logs/error.log
Thu, 06 Jun 2013 16:29:20 +0200 [ERROR] request="51b09cbec1156" component="...": my-error
Actual result¶
$ cat typo3temp/logs/debug.log
Thu, 06 Jun 2013 16:25:25 +0200 [ERROR] request="51b09bd4a9c19" component="...": my-error
Thu, 06 Jun 2013 16:25:25 +0200 [ERROR] request="51b09bd4a9c19" component="...": my-error
Thu, 06 Jun 2013 16:25:25 +0200 [DEBUG] request="51b09bd4a9c19" component="...": my-debug
$ cat typo3temp/logs/error.log
[EMPTY FILE]