File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,14 @@ public function __construct($appName,
4949
5050 private function getLogIterator () {
5151 $ 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 );
52+ $ logClasses = ['\OC\Log\Owncloud ' , '\OC_Log_Owncloud ' , '\OC\Log\File ' ];
53+ foreach ($ logClasses as $ logClass ) {
54+ 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 ' );
5560 }
5661
5762 /**
You can’t perform that action at this time.
0 commit comments