From 65a4057b2f74254a1d6f281f481b9b9b0e371a0b Mon Sep 17 00:00:00 2001 From: Thomas Pulzer Date: Mon, 4 Jul 2016 11:50:32 +0200 Subject: [PATCH] Changed name of default logfile from owncloud.log to nextcloud.log. --- apps/dav/tests/travis/caldav/script.sh | 2 +- apps/dav/tests/travis/carddav/script.sh | 2 +- build/integration/run.sh | 2 +- config/config.sample.php | 6 +++--- core/Command/Log/OwnCloud.php | 2 +- core/Command/Upgrade.php | 2 +- issue_template.md | 2 +- lib/base.php | 4 ++-- lib/private/Log/Owncloud.php | 4 ++-- tests/Core/Command/Log/OwnCloudTest.php | 4 ++-- tests/lib/TestCase.php | 2 +- tests/travis/install.sh | 6 +++--- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/dav/tests/travis/caldav/script.sh b/apps/dav/tests/travis/caldav/script.sh index 7259372567cd0..636235349c504 100644 --- a/apps/dav/tests/travis/caldav/script.sh +++ b/apps/dav/tests/travis/caldav/script.sh @@ -16,6 +16,6 @@ PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onf RESULT=$? -tail "$/../../../../../data-autotest/owncloud.log" +tail "$/../../../../../data-autotest/nextcloud.log" exit $RESULT diff --git a/apps/dav/tests/travis/carddav/script.sh b/apps/dav/tests/travis/carddav/script.sh index a8bd9f11b38df..ecdc0f9586359 100644 --- a/apps/dav/tests/travis/carddav/script.sh +++ b/apps/dav/tests/travis/carddav/script.sh @@ -17,6 +17,6 @@ PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onf RESULT=$? -tail "$/../../../../../data-autotest/owncloud.log" +tail "$/../../../../../data-autotest/nextcloud.log" exit $RESULT diff --git a/build/integration/run.sh b/build/integration/run.sh index 3725ba1af6fca..2abceaa1fad62 100755 --- a/build/integration/run.sh +++ b/build/integration/run.sh @@ -40,7 +40,7 @@ kill $PHPPID kill $PHPPID_FED if [ -z $HIDE_OC_LOGS ]; then - tail "../../data/owncloud.log" + tail "../../data/nextcloud.log" fi exit $RESULT diff --git a/config/config.sample.php b/config/config.sample.php index 512a5d05ba7f2..6285e096ba799 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -549,7 +549,7 @@ */ /** - * By default the Nextcloud logs are sent to the ``owncloud.log`` file in the + * By default the Nextcloud logs are sent to the ``nextcloud.log`` file in the * default Nextcloud data directory. * If syslogging is desired, set this parameter to ``syslog``. * Setting this parameter to ``errorlog`` will use the PHP error_log function @@ -559,9 +559,9 @@ /** * Log file path for the Nextcloud logging type. - * Defaults to ``[datadirectory]/owncloud.log`` + * Defaults to ``[datadirectory]/nextcloud.log`` */ -'logfile' => '/var/log/owncloud.log', +'logfile' => '/var/log/nextcloud.log', /** * Loglevel to start logging at. Valid values are: 0 = Debug, 1 = Info, 2 = diff --git a/core/Command/Log/OwnCloud.php b/core/Command/Log/OwnCloud.php index 7213f6726a2c0..b469f2064f78e 100644 --- a/core/Command/Log/OwnCloud.php +++ b/core/Command/Log/OwnCloud.php @@ -95,7 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('Log backend ownCloud: '.$enabledText); $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); - $defaultLogFile = rtrim($dataDir, '/').'/owncloud.log'; + $defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log'; $output->writeln('Log file: '.$this->config->getSystemValue('logfile', $defaultLogFile)); $rotateSize = $this->config->getSystemValue('log_rotate_size', 0); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 61b2e59a353f6..3550271fb5b05 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -300,7 +300,7 @@ function ($success) use($output, $updateStepEnabled, $self) { //Possible scenario: ownCloud core is updated but an app failed $output->writeln('ownCloud is in maintenance mode'); $output->write('Maybe an upgrade is already in process. Please check the ' - . 'logfile (data/owncloud.log). If you want to re-run the ' + . 'logfile (data/nextcloud.log). If you want to re-run the ' . 'upgrade procedure, remove the "maintenance mode" from ' . 'config.php and call this script again.' , true); diff --git a/issue_template.md b/issue_template.md index a17628377b1ce..b18401c506093 100644 --- a/issue_template.md +++ b/issue_template.md @@ -94,7 +94,7 @@ Eventually replace sensitive data as the name/IP-address of your LDAP server or Insert your webserver log here ``` -#### Nextcloud log (data/owncloud.log) +#### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` diff --git a/lib/base.php b/lib/base.php index 9e5304b163436..dde8e38218afd 100644 --- a/lib/base.php +++ b/lib/base.php @@ -754,8 +754,8 @@ public static function registerLogRotate() { $systemConfig = \OC::$server->getSystemConfig(); if ($systemConfig->getValue('installed', false) && $systemConfig->getValue('log_rotate_size', false) && !self::checkUpgrade(false)) { //don't try to do this before we are properly setup - //use custom logfile path if defined, otherwise use default of owncloud.log in data directory - \OCP\BackgroundJob::registerJob('OC\Log\Rotate', $systemConfig->getValue('logfile', $systemConfig->getValue('datadirectory', OC::$SERVERROOT . '/data') . '/owncloud.log')); + //use custom logfile path if defined, otherwise use default of nextcloud.log in data directory + \OCP\BackgroundJob::registerJob('OC\Log\Rotate', $systemConfig->getValue('logfile', $systemConfig->getValue('datadirectory', OC::$SERVERROOT . '/data') . '/nextcloud.log')); } } diff --git a/lib/private/Log/Owncloud.php b/lib/private/Log/Owncloud.php index 07106be22b159..d76145ebdd358 100644 --- a/lib/private/Log/Owncloud.php +++ b/lib/private/Log/Owncloud.php @@ -33,7 +33,7 @@ /** * logging utilities * - * Log is saved at data/owncloud.log (on default) + * Log is saved at data/nextcloud.log (on default) */ class Owncloud { @@ -44,7 +44,7 @@ class Owncloud { */ public static function init() { $systemConfig = \OC::$server->getSystemConfig(); - $defaultLogFile = $systemConfig->getValue("datadirectory", \OC::$SERVERROOT.'/data').'/owncloud.log'; + $defaultLogFile = $systemConfig->getValue("datadirectory", \OC::$SERVERROOT.'/data').'/nextcloud.log'; self::$logFile = $systemConfig->getValue("logfile", $defaultLogFile); /** diff --git a/tests/Core/Command/Log/OwnCloudTest.php b/tests/Core/Command/Log/OwnCloudTest.php index 3cb05221c37ce..e0445a5cfda9f 100644 --- a/tests/Core/Command/Log/OwnCloudTest.php +++ b/tests/Core/Command/Log/OwnCloudTest.php @@ -101,7 +101,7 @@ public function testGetConfiguration() { ->will($this->returnValueMap([ ['log_type', 'owncloud', 'log_type_value'], ['datadirectory', \OC::$SERVERROOT.'/data', '/data/directory/'], - ['logfile', '/data/directory/owncloud.log', '/var/log/owncloud.log'], + ['logfile', '/data/directory/nextcloud.log', '/var/log/nextcloud.log'], ['log_rotate_size', 0, 5 * 1024 * 1024], ])); @@ -110,7 +110,7 @@ public function testGetConfiguration() { ->with('Log backend ownCloud: disabled'); $this->consoleOutput->expects($this->at(1)) ->method('writeln') - ->with('Log file: /var/log/owncloud.log'); + ->with('Log file: /var/log/nextcloud.log'); $this->consoleOutput->expects($this->at(2)) ->method('writeln') ->with('Rotate at: 5 MB'); diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index a1f65f8ac822f..514cb6ea3a5a0 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -269,7 +269,7 @@ static protected function tearDownAfterClassCleanFileCache(IQueryBuilder $queryB */ static protected function tearDownAfterClassCleanStrayDataFiles($dataDir) { $knownEntries = array( - 'owncloud.log' => true, + 'nextcloud.log' => true, 'owncloud.db' => true, '.ocdata' => true, '..' => true, diff --git a/tests/travis/install.sh b/tests/travis/install.sh index fe7907f798caa..180e0c634da4f 100755 --- a/tests/travis/install.sh +++ b/tests/travis/install.sh @@ -173,8 +173,8 @@ cat $BASEDIR/config/config.php echo "data directory:" ls -ll $DATADIR -echo "owncloud.log:" -[ -f "$DATADIR/owncloud.log" ] && cat $DATADIR/owncloud.log -[ -f "$BASEDIR/data/owncloud.log" ] && cat $BASEDIR/data/owncloud.log +echo "nextcloud.log:" +[ -f "$DATADIR/nextcloud.log" ] && cat $DATADIR/nextcloud.log +[ -f "$BASEDIR/data/nextcloud.log" ] && cat $BASEDIR/data/nextcloud.log cd $BASEDIR