aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Log/Manage.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Log/Manage.php')
-rw-r--r--core/Command/Log/Manage.php42
1 files changed, 11 insertions, 31 deletions
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index 63a8efde370..f67f0d969f6 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -1,28 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Johannes Ernst <jernst@indiecomputing.com>
- * @author Robin McCorkell <robin@mccorkell.me.uk>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Tim Terhorst <mynamewastaken+gitlab@gmail.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Core\Command\Log;
@@ -39,10 +20,9 @@ class Manage extends Command implements CompletionAwareInterface {
public const DEFAULT_LOG_LEVEL = 2;
public const DEFAULT_TIMEZONE = 'UTC';
- protected IConfig $config;
-
- public function __construct(IConfig $config) {
- $this->config = $config;
+ public function __construct(
+ protected IConfig $config,
+ ) {
parent::__construct();
}
@@ -104,14 +84,14 @@ class Manage extends Command implements CompletionAwareInterface {
// display configuration
$backend = $this->config->getSystemValue('log_type', self::DEFAULT_BACKEND);
- $output->writeln('Enabled logging backend: '.$backend);
+ $output->writeln('Enabled logging backend: ' . $backend);
$levelNum = $this->config->getSystemValue('loglevel', self::DEFAULT_LOG_LEVEL);
$level = $this->convertLevelNumber($levelNum);
- $output->writeln('Log level: '.$level.' ('.$levelNum.')');
+ $output->writeln('Log level: ' . $level . ' (' . $levelNum . ')');
$timezone = $this->config->getSystemValue('logtimezone', self::DEFAULT_TIMEZONE);
- $output->writeln('Log timezone: '.$timezone);
+ $output->writeln('Log timezone: ' . $timezone);
return 0;
}
@@ -120,7 +100,7 @@ class Manage extends Command implements CompletionAwareInterface {
* @throws \InvalidArgumentException
*/
protected function validateBackend($backend) {
- if (!class_exists('OC\\Log\\'.ucfirst($backend))) {
+ if (!class_exists('OC\\Log\\' . ucfirst($backend))) {
throw new \InvalidArgumentException('Invalid backend');
}
}