From 63ad62f35567f8da21a0999e710fcc1735b391d7 Mon Sep 17 00:00:00 2001
From: Susanne Moog <look@susi.dev>
Date: Sat, 7 Mar 2020 12:03:15 +0100
Subject: [PATCH] [DOCS] Clarify changed logger instantiation in scheduler
 tasks

Resolves: #90415
Releases: master, 9.5
Change-Id: Icb403e6ef2892ff7988a34652d6cdfa8f8bd1cfd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63601
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 ...-CallingSchedulerTaskThrowsLoggerError.rst | 24 -------------
 ...ggerFromSerialisationForSchedulerTasks.rst | 34 +++++++++++++++++++
 2 files changed, 34 insertions(+), 24 deletions(-)
 delete mode 100644 typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-CallingSchedulerTaskThrowsLoggerError.rst
 create mode 100644 typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-ExcludeLoggerFromSerialisationForSchedulerTasks.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-CallingSchedulerTaskThrowsLoggerError.rst b/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-CallingSchedulerTaskThrowsLoggerError.rst
deleted file mode 100644
index 2910e3ad69a8..000000000000
--- a/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-CallingSchedulerTaskThrowsLoggerError.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-.. include:: ../../Includes.txt
-
-=========================================================================================
-Important: #86785 - Calling scheduler command on CLI throws error if not in /var/www/html
-=========================================================================================
-
-See :issue:`86785`
-
-Description
-===========
-
-Calling the scheduler command on CLI or in backend throws an error, if the TYPO3 CMS installation is not running in @/var/www/html/@.
-
-After saving the scheduler task, the logger instance is serialized to the database with absolute paths (FileWriter::class).
-Exclusion of the logger instance from the record during save to database prevents that error.
-
-Impact
-======
-
-The stored and serialized tasks from upgraded TYPO3 instances and new saved tasks still work as before.
-The logger instance is initialized while running the scheduler task and is not saved to the serialized task
-object anymore. The logger (FileWriter::class) can open and write the log file to the current environment paths.
-
-.. index:: Backend, ext:scheduler
diff --git a/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-ExcludeLoggerFromSerialisationForSchedulerTasks.rst b/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-ExcludeLoggerFromSerialisationForSchedulerTasks.rst
new file mode 100644
index 000000000000..5fd59bea15a8
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/9.5.x/Important-86785-ExcludeLoggerFromSerialisationForSchedulerTasks.rst
@@ -0,0 +1,34 @@
+.. include:: ../../Includes.txt
+
+================================================================================
+Important: #86785 - Exclude logger from serialisation on save for scheduler task
+================================================================================
+
+See :issue:`86785`
+
+Description
+===========
+
+Calling the scheduler command on CLI or in backend throws an error, when you
+created a scheduler task in one environment (for example one where TYPO3 was
+running in `/var/www/html`) - and then you take that database and move to another
+environment (where TYPO3 is running somewhere else, for example in
+`/var/www/something`). Trying to execute any task in the scheduler resulted
+in an error, because the Logger instance that was stored with the task in the
+database had the wrong log file path.
+
+To get rid of that problem, the logger is no longer stored with the task in the
+database, but instead re-instantiated when the task is run
+(which means it checks for correct paths on the current environment).
+
+Exclusion of the logger instance from the record during save to database
+prevents the error.
+
+Impact
+======
+
+The stored and serialized tasks from upgraded TYPO3 instances and new saved tasks still work as before.
+The logger instance is initialized while running the scheduler task and is not saved to the serialized task
+object anymore. The logger (FileWriter::class) can open and write the log file to the current environment paths.
+
+.. index:: Backend, ext:scheduler
-- 
GitLab