summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-25 11:41:24 +0200
committerGitHub <noreply@github.com>2016-07-25 11:41:24 +0200
commit4ad0c383ade90eb2f339daa392828e145f1a3b6b (patch)
tree0c223080b36bbff7a2aaeef3bb5db2d97c408dee /core
parent6a25e5f0eb56d3c712a2025a2df590a6da651dab (diff)
parent61a1d56d2784d407ac0922ea1fcd382b21f3df06 (diff)
downloadnextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.tar.gz
nextcloud-server-4ad0c383ade90eb2f339daa392828e145f1a3b6b.zip
Merge pull request #523 from Faldon/master
Renamed file logging
Diffstat (limited to 'core')
-rw-r--r--core/Command/Log/File.php (renamed from core/Command/Log/OwnCloud.php)14
-rw-r--r--core/Command/Log/Manage.php4
-rw-r--r--core/register_command.php2
3 files changed, 11 insertions, 9 deletions
diff --git a/core/Command/Log/OwnCloud.php b/core/Command/Log/File.php
index 391259f76b8..ec490237400 100644
--- a/core/Command/Log/OwnCloud.php
+++ b/core/Command/Log/File.php
@@ -31,7 +31,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-class OwnCloud extends Command {
+class File extends Command {
/** @var IConfig */
protected $config;
@@ -43,8 +43,8 @@ class OwnCloud extends Command {
protected function configure() {
$this
- ->setName('log:owncloud')
- ->setDescription('manipulate ownCloud logging backend')
+ ->setName('log:file')
+ ->setDescription('manipulate logging backend')
->addOption(
'enable',
null,
@@ -70,7 +70,7 @@ class OwnCloud extends Command {
$toBeSet = [];
if ($input->getOption('enable')) {
- $toBeSet['log_type'] = 'owncloud';
+ $toBeSet['log_type'] = 'file';
}
if ($file = $input->getOption('file')) {
@@ -89,12 +89,14 @@ class OwnCloud extends Command {
}
// display config
- if ($this->config->getSystemValue('log_type', 'owncloud') === 'owncloud') {
+ // TODO: Drop backwards compatibility for config in the future
+ $logType = $this->config->getSystemValue('log_type', 'file');
+ if ($logType === 'file' || $logType === 'owncloud') {
$enabledText = 'enabled';
} else {
$enabledText = 'disabled';
}
- $output->writeln('Log backend ownCloud: '.$enabledText);
+ $output->writeln('Log backend file: '.$enabledText);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
$defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log';
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index 14d41170dca..554708dfa42 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -34,7 +34,7 @@ use Symfony\Component\Console\Output\OutputInterface;
class Manage extends Command {
- const DEFAULT_BACKEND = 'owncloud';
+ const DEFAULT_BACKEND = 'file';
const DEFAULT_LOG_LEVEL = 2;
const DEFAULT_TIMEZONE = 'UTC';
@@ -54,7 +54,7 @@ class Manage extends Command {
'backend',
null,
InputOption::VALUE_REQUIRED,
- 'set the logging backend [owncloud, syslog, errorlog]'
+ 'set the logging backend [file, syslog, errorlog]'
)
->addOption(
'level',
diff --git a/core/register_command.php b/core/register_command.php
index 6f20769fa70..6a220c22b3f 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -99,7 +99,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
);
$application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
- $application->add(new OC\Core\Command\Log\OwnCloud(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
$view = new \OC\Files\View();
$util = new \OC\Encryption\Util(