Bug #81377

Possible Bug in LogManager

Added by Kai Tallafus over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2017-05-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

I tried configuring logging for an extension:

$GLOBALS['TYPO3_CONF_VARS']['LOG']['MyVendor']['MyExtension']['Command']['FooCommandController']['writerConfiguration'] = array(
    \TYPO3\CMS\Core\Log\LogLevel::ERROR => array(
        // add a FileWriter
        'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => array(
            // configuration for the writer
            'logFile' => 'typo3temp/logs/my_foo_command.log'
        )
    )
);

But the logging allways ended up in a file named like the $defaultLogFileTemplate definied in FileWriter.

Looking at LogManager::getConfigurationForLogger(), I found out that my configuration is resolved correctly, but obviously not returned. At least that´s what it looks like to me. The method allways returns $result, which contains the top level configuration, not the resolved configuration stored in $configuration.

Could someone check this?

#1

Updated by Markus Klein over 4 years ago

how do you instantiate the logger?

#2

Updated by Kai Tallafus over 4 years ago

Sorry, this was my fault. I searched the file in the wrong directory (typo3temp/var/logs/ instead of /typo3temp/logs/ as configured) ^^

This ticked can be closed!

#3

Updated by Markus Klein over 4 years ago

  • Status changed from New to Closed
  • Priority changed from Must have to -- undefined --

Also available in: Atom PDF