Skip to content
Snippets Groups Projects
Commit e216366a authored by Christian Weiske's avatar Christian Weiske Committed by Christian Kuhn
Browse files

[BUGFIX] Add scheduler task exception to error message

When a scheduler task throws an exception, an error is logged.
The log message does not tell us the reason for the failure:
> Task failed to execute successfully.
> Class: TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask, UID: 2

Up to TYPO3 v10, this message did include more information:
> Task failed to execute successfully.
> Class: TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask, UID: 2,
> Code: 56, OpenSSL SSL_read: Connection reset by peer, errno 104

This behavior was changed (probably unintentional) with patch
"[BUGFIX] Make logger usage PSR-3 compliant"
https://review.typo3.org/c/Packages/TYPO3.CMS/+/69425

Besides the task class and UID, the log message now contains the
exception code, message, file and line.

Example:
> Task failed to execute successfully.
> Class: TYPO3\CMS\Scheduler\Task\ExecuteSchedulableCommandTask, UID: 6,
> Code: 500, "FailTask fail message"
> in /var/www/typo3/vendor/[...]/Classes/Command/FailTask.php#19

Resolves: #103799
Related: #94356
Releases: main, 12.4
Change-Id: I179f059e551966944288b6fda6f2a26a4daace3b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84152


Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent cf749330
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment