Merge pull request #31881 from nextcloud/backport/31877/stable22

[stable22] Do not decorate the CLI output if it's explicitly turned off
This commit is contained in:
blizzz 2022-04-14 13:01:19 +02:00 committed by GitHub
commit bf2b6bb370
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;