Merge pull request #31880 from nextcloud/backport/31877/stable23

[stable23] Do not decorate the CLI output if it's explicitly turned off
This commit is contained in:
blizzz 2022-04-14 13:43:56 +02:00 committed by GitHub
commit 35c7d14f95
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;