We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e215aa commit 2b18363Copy full SHA for 2b18363
1 file changed
controller/logcontroller.php
@@ -49,9 +49,14 @@ public function __construct($appName,
49
50
private function getLogIterator() {
51
$dateFormat = $this->config->getSystemValue('logdateformat', \DateTime::ISO8601);
52
- $logClass = class_exists('\OC\Log\Owncloud') ? '\OC\Log\Owncloud' : '\OC_Log_Owncloud';
53
- $handle = fopen($logClass::getLogFilePath(), 'rb');
54
- return new LogIterator($handle, $dateFormat);
+ $logClasses = ['\OC\Log\Owncloud', '\OC_Log_Owncloud', '\OC\Log\File'];
+ foreach($logClasses as $logClass) {
+ if (class_exists($logClass)) {
55
+ $handle = fopen($logClass::getLogFilePath(), 'rb');
56
+ return new LogIterator($handle, $dateFormat);
57
+ }
58
59
+ throw new \Exception('Can\'t find log class');
60
}
61
62
/**
0 commit comments