From e8767787037d0ec25b65fb3ff5ec5a6c54b3a6b6 Mon Sep 17 00:00:00 2001
From: Markus Klein <markus.klein@typo3.org>
Date: Fri, 31 Mar 2017 11:15:00 +0100
Subject: [PATCH] Revert "[BUGFIX] fix scheduler task logging in case of an
 Exception"

This reverts commit 11deab5a29537490ed2b1492f9ac0ca0fb27465c.

Due to a wrong commit message this change is reverted.
There is no backport yet.

Change-Id: I3258a3aed4f1ec4ccb8a9cb9928d1876e6fd67ba
Resolves: #80566
Releases: master
Reviewed-on: https://review.typo3.org/52284
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
---
 typo3/sysext/scheduler/Classes/Task/AbstractTask.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/typo3/sysext/scheduler/Classes/Task/AbstractTask.php b/typo3/sysext/scheduler/Classes/Task/AbstractTask.php
index 3fc1bb7cdfdb..36d8b919210c 100644
--- a/typo3/sysext/scheduler/Classes/Task/AbstractTask.php
+++ b/typo3/sysext/scheduler/Classes/Task/AbstractTask.php
@@ -490,9 +490,8 @@ abstract class AbstractTask
             }
             if ($failure instanceof \Exception) {
                 // Log failed execution
-                $logMessage = 'Task failed to execute successfully. Class: ' . get_class($this)
-                    . ', UID: ' . $this->taskUid . ', Code: ' . $failure->getCode() . ', ' . $failure->getMessage();
-                $this->scheduler->log($logMessage, 1);
+                $logMessage = 'Task failed to execute successfully. Class: ' . get_class($this) . ', UID: ' . $this->taskUid . '. ' . $failure->getMessage();
+                $this->scheduler->log($logMessage, 1, $failure->getCode());
                 // Do not serialize the complete exception or the trace, this can lead to huge strings > 50MB
                 $failureString = serialize([
                     'code' => $failure->getCode(),
-- 
GitLab