From 065eda3cafdec61b7462268207a9cdfc4d83f901 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 7 Apr 2022 14:38:10 +0200 Subject: Do not decorate the CLI output if it's explicitly turned off Signed-off-by: Christoph Wurst --- lib/private/Console/TimestampFormatter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index 59e480b39e8..c25ed578805 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -99,6 +99,11 @@ class TimestampFormatter implements OutputFormatterInterface { * log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00" */ public function format($message) { + if (!$this->formatter->isDecorated()) { + // Don't add anything to the output when we shouldn't + return $this->formatter->format($message); + } + $timeZone = $this->config->getSystemValue('logtimezone', 'UTC'); $timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null; -- cgit v1.2.3