Reputation: 8728
I would like to log into Typo3's Administration protocoll (sys_log table) from my plugin. This is what I have:
//classes/controller/MyExtensionController.php
Class MyExtensionController {
public function doAction() {
$logger = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Log\\LogManager')->getLogger(__CLASS__);
$logger->info('TEST', ['something'=>123]);
}
}
I don't get any error, but there is no entry in the sys_log Table.
Upvotes: 1
Views: 615
Reputation: 7939
The logging framework does not automatically write into the database table sys_log
which can be viewed in the Backend Log module. those are 2 different things (in future versions those will be more coupled again).
If you want to write into the sys_log
table, you need to configure a Database Writer.
Upvotes: 1