diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-04-07 15:38:10 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-04-07 18:23:17 +0300 |
commit | 9534931462453fa4d0a748b4e1ca7a47d56b765c (patch) | |
tree | 7a9f86db05ac12dd6483b595f2c56fc3719ac1d9 | |
parent | 48e7daea2e81a9c22274d5ccc04f97162e3d5213 (diff) |
Do not decorate the CLI output if it's explicitly turned offbackport/31877/stable22
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | lib/private/Console/TimestampFormatter.php | 5 |
1 files changed, 5 insertions, 0 deletions
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; |