aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Console
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-04-07 14:38:10 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-04-07 14:38:10 +0200
commit49cb1b724b932c5b2f74e9258b8f27d588ff9898 (patch)
treec36d81fa7dd3c2e36ab2243e3d0b4635cf45f6b8 /lib/private/Console
parent0e29dc8c76a379b7f34f63303ae831e52bb62801 (diff)
downloadnextcloud-server-49cb1b724b932c5b2f74e9258b8f27d588ff9898.tar.gz
nextcloud-server-49cb1b724b932c5b2f74e9258b8f27d588ff9898.zip
Do not decorate the CLI output if it's explicitly turned off
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Console')
-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;