diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-04-14 13:43:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 13:43:56 +0200 |
commit | 35c7d14f9581d27317de27476af93e194882c86a (patch) | |
tree | ef57b3286977eb269debd89fbfc564ed199b7668 | |
parent | bc52905ad04caadee8b032daa653795aeb0d6f33 (diff) | |
parent | 065eda3cafdec61b7462268207a9cdfc4d83f901 (diff) | |
download | nextcloud-server-35c7d14f9581d27317de27476af93e194882c86a.tar.gz nextcloud-server-35c7d14f9581d27317de27476af93e194882c86a.zip |
Merge pull request #31880 from nextcloud/backport/31877/stable23
[stable23] Do not decorate the CLI output if it's explicitly turned off
-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; |