ESP32
ESP32

Reputation: 8728

TYPO3 logger->log does not do anything

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

Answers (1)

Georg Ringer
Georg Ringer

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

Related Questions