Bug #95927

scheduler task (TestTask) is not logging /creating log entries when executed (v10 and v11)

Added by Marco H 8 months ago. Updated 8 months ago.

-- undefined --
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
scheduler log logging
Is Regression:
Sprint Focus:


I've had this issue in TYPO3 10.4 and 11.5

The Test Task (sysext\scheduler\Classes\Example\TestTask.php) in scheduler sends an email, it should also create a log entry while doing so:

$this->logger->info('[TYPO3\\CMS\\Scheduler\\Example\\TestTask]: Test email sent to "' . $this->email . '"');

$this->logger->info('[TYPO3\\CMS\\Scheduler\\Example\\TestTask]: Test email sent to "{email}"', ['email' => $this->email]);

However, the backend log module doesn't show this log entry.

The log is working, it shows logs like "Scheduler task "Scheduler test task" (UID: 1, Class: "TYPO3\CMS\Scheduler\Example\TestTask") was added" or "User xxx logged in from"

Am I missing something?


Updated by Georg Ringer 8 months ago

  • TYPO3 Version changed from 11 to 10

Updated by Georg Ringer 8 months ago

  • Status changed from New to Needs Feedback

The logging framework (See https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Logging/Index.html for more information) does not automatically log into the database (which you know from the log backend module).

if you either change the ->info to ->warning in the TestTask or adopt the configuration in the LocalConfiguration or AdditionalConfiguration you will get an entry in var/log/typo3_*****.log like

Wed, 10 Nov 2021 16:12:27 +0100 [WARNING] request="e1ec9048982ac" component="TYPO3.CMS.Scheduler.Task.AbstractTask": [TYPO3\CMS\Scheduler\Example\TestTask]: Test email sent to "fo@bar.com" - {"email":"fo@bar.com"}

does this information help and can I close the issue?


Updated by Marco H 8 months ago

  • Priority changed from Should have to -- undefined --

Oh, you're right. I wasn't aware that the logs are independent from each other.
So it was my fault - you can close this, thank you for the explanation.


Updated by Georg Ringer 8 months ago

  • Status changed from Needs Feedback to Closed

Also available in: Atom PDF