aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorThomas Pulzer <t.pulzer@kniel.de>2016-07-22 11:44:19 +0200
committerThomas Pulzer <t.pulzer@kniel.de>2016-07-22 11:44:19 +0200
commitba3f4f118e8c48a23dcffa723e38439f0b9b7df9 (patch)
tree40cf7127d4bb63f362a37185820eee50fd849ce8 /settings
parent4b4990c48fd4c6841bde260b2b2e1bc665b46e1c (diff)
downloadnextcloud-server-ba3f4f118e8c48a23dcffa723e38439f0b9b7df9.tar.gz
nextcloud-server-ba3f4f118e8c48a23dcffa723e38439f0b9b7df9.zip
Changed logtype to file instead of owncloud.
- Updated the config sample to point to log_type='file' - Renamed the Class for logfile logging to File in namespace 'OC\Log\'. Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'. - Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'. Changed registration of the command to use 'OC\Core\Command\Log\File'. - Changed default Syslog tag to Nextcloud - Retained backwards compatibility for configs with 'logtype' => 'owncloud' - Adjusted tests for the new file log. Closes #490.
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/LogSettingsController.php6
-rw-r--r--settings/admin.php7
2 files changed, 7 insertions, 6 deletions
diff --git a/settings/Controller/LogSettingsController.php b/settings/Controller/LogSettingsController.php
index ce4913c2478..23e0fba902a 100644
--- a/settings/Controller/LogSettingsController.php
+++ b/settings/Controller/LogSettingsController.php
@@ -93,8 +93,8 @@ class LogSettingsController extends Controller {
*/
public function getEntries($count=50, $offset=0) {
return new JSONResponse([
- 'data' => \OC\Log\Owncloud::getEntries($count, $offset),
- 'remain' => count(\OC\Log\Owncloud::getEntries(1, $offset + $count)) !== 0,
+ 'data' => \OC\Log\File::getEntries($count, $offset),
+ 'remain' => count(\OC\Log\File::getEntries(1, $offset + $count)) !== 0,
]);
}
@@ -106,7 +106,7 @@ class LogSettingsController extends Controller {
* @return StreamResponse
*/
public function download() {
- $resp = new StreamResponse(\OC\Log\Owncloud::getLogFilePath());
+ $resp = new StreamResponse(\OC\Log\File::getLogFilePath());
$resp->addHeader('Content-Type', 'application/octet-stream');
$resp->addHeader('Content-Disposition', 'attachment; filename="nextcloud.log"');
return $resp;
diff --git a/settings/admin.php b/settings/admin.php
index 11d3a3f40db..a458c813c11 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -44,12 +44,13 @@ OC_Util::addScript('files', 'jquery.fileupload');
\OC::$server->getEventDispatcher()->dispatch('OC\Settings\Admin::loadAdditionalScripts');
-$showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud');
+$logType = \OC::$server->getConfig()->getSystemValue('log_type', 'file');
+$showLog = ($logType === 'file' || $logType === 'owncloud');
$numEntriesToLoad = 3;
-$entries = \OC\Log\Owncloud::getEntries($numEntriesToLoad + 1);
+$entries = \OC\Log\File::getEntries($numEntriesToLoad + 1);
$entriesRemaining = count($entries) > $numEntriesToLoad;
$entries = array_slice($entries, 0, $numEntriesToLoad);
-$logFilePath = \OC\Log\Owncloud::getLogFilePath();
+$logFilePath = \OC\Log\File::getLogFilePath();
$doesLogFileExist = file_exists($logFilePath);
$logFileSize = 0;
if($doesLogFileExist) {