I'm trying to congiure logging for one custom class in TYPO3 using the configuration of the logging framework as explained here:
I want to configure logging for every class in
\Aip\Taglialacoda\Task\
With no configuration log messages are written in the log file under typo3temp\var\log
I have made several tries like this one:
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Aip']['Taglialacoda']['Task']['writerConfiguration'] = [
TYPO3\CMS\Core\Log\LogLevel::INFO => [
TYPO3\CMS\Core\Log\Writer\SyslogWriter::class => [],
]
];
The result is always the same: I cannot find messages logged anywhere. The class I wrote is a task so it extends AbstractTask and has its own logger. For this reason I have istantiated another logger (I don't want that every task write into SYS LOG) As I said with no configuration the new logger writes into the log file. Adding a mistyped configuration the class throws an exception (so the configuration is taken into account). Using the configuration above the log message seems to disappear.