Skip to content

Commit bf2b6bb

Browse files
authored
Merge pull request #31881 from nextcloud/backport/31877/stable22
[stable22] Do not decorate the CLI output if it's explicitly turned off
2 parents 6a9185a + 9534931 commit bf2b6bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/private/Console/TimestampFormatter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ public function getStyle($name) {
9999
* log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
100100
*/
101101
public function format($message) {
102+
if (!$this->formatter->isDecorated()) {
103+
// Don't add anything to the output when we shouldn't
104+
return $this->formatter->format($message);
105+
}
106+
102107
$timeZone = $this->config->getSystemValue('logtimezone', 'UTC');
103108
$timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null;
104109

0 commit comments

Comments
 (0)