Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-14 14:01:19 +0300
committerGitHub <noreply@github.com>2022-04-14 14:01:19 +0300
commitbf2b6bb370386c63807b745af3a9023810c416e4 (patch)
tree12fb649f0bfd4d8801783e82de5dfebae1e7f245
parent6a9185a2a34c5e15d1355e691681d63c9e8b5d57 (diff)
parent9534931462453fa4d0a748b4e1ca7a47d56b765c (diff)
Merge pull request #31881 from nextcloud/backport/31877/stable22
[stable22] Do not decorate the CLI output if it's explicitly turned off
-rw-r--r--lib/private/Console/TimestampFormatter.php5
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;