Skip to content

Commit

Permalink
Merge pull request #31880 from nextcloud/backport/31877/stable23
Browse files Browse the repository at this point in the history
[stable23] Do not decorate the CLI output if it's explicitly turned off
  • Loading branch information
blizzz authored Apr 14, 2022
2 parents bc52905 + 065eda3 commit 35c7d14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/private/Console/TimestampFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ public function getStyle($name) {
* 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;

Expand Down

0 comments on commit 35c7d14

Please sign in to comment.