diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2022-04-07 17:12:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 17:12:12 +0200 |
commit | 7bd8a0f2af6c76631b341371411694022d75563b (patch) | |
tree | 930639a5e6d2579e0828d7f71f8f829c8435d9ca | |
parent | 018ca43c096c9ab5de0c0388e60ea494ac0480a4 (diff) | |
parent | 49cb1b724b932c5b2f74e9258b8f27d588ff9898 (diff) | |
download | nextcloud-server-7bd8a0f2af6c76631b341371411694022d75563b.tar.gz nextcloud-server-7bd8a0f2af6c76631b341371411694022d75563b.zip |
Merge pull request #31877 from nextcloud/fix/no-console-formatting-if-decoration-off
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; |