|
56 | 56 | use OCP\App\ManagerEvent; |
57 | 57 | use OCP\Authentication\IAlternativeLogin; |
58 | 58 | use OCP\EventDispatcher\IEventDispatcher; |
59 | | -use OCP\ILogger; |
60 | 59 | use OC\AppFramework\Bootstrap\Coordinator; |
61 | 60 | use OC\App\DependencyAnalyzer; |
62 | 61 | use OC\App\Platform; |
@@ -292,7 +291,7 @@ public static function getInstallPath() { |
292 | 291 | } |
293 | 292 | } |
294 | 293 |
|
295 | | - \OCP\Util::writeLog('core', 'No application directories are marked as writable.', ILogger::ERROR); |
| 294 | + \OCP\Server::get(LoggerInterface::class)->error('No application directories are marked as writable.', ['app' => 'core']); |
296 | 295 | return null; |
297 | 296 | } |
298 | 297 |
|
@@ -517,7 +516,7 @@ public static function getAllApps(): array { |
517 | 516 |
|
518 | 517 | foreach (OC::$APPSROOTS as $apps_dir) { |
519 | 518 | if (!is_readable($apps_dir['path'])) { |
520 | | - \OCP\Util::writeLog('core', 'unable to read app folder : ' . $apps_dir['path'], ILogger::WARN); |
| 519 | + \OCP\Server::get(LoggerInterface::class)->warning('unable to read app folder : ' . $apps_dir['path'], ['app' => 'core']); |
521 | 520 | continue; |
522 | 521 | } |
523 | 522 | $dh = opendir($apps_dir['path']); |
@@ -568,12 +567,12 @@ public function listAllApps(): array { |
568 | 567 | if (array_search($app, $blacklist) === false) { |
569 | 568 | $info = $appManager->getAppInfo($app, false, $langCode); |
570 | 569 | if (!is_array($info)) { |
571 | | - \OCP\Util::writeLog('core', 'Could not read app info file for app "' . $app . '"', ILogger::ERROR); |
| 570 | + \OCP\Server::get(LoggerInterface::class)->error('Could not read app info file for app "' . $app . '"', ['app' => 'core']); |
572 | 571 | continue; |
573 | 572 | } |
574 | 573 |
|
575 | 574 | if (!isset($info['name'])) { |
576 | | - \OCP\Util::writeLog('core', 'App id "' . $app . '" has no name in appinfo', ILogger::ERROR); |
| 575 | + \OCP\Server::get(LoggerInterface::class)->error('App id "' . $app . '" has no name in appinfo', ['app' => 'core']); |
577 | 576 | continue; |
578 | 577 | } |
579 | 578 |
|
@@ -870,11 +869,11 @@ public static function getStorage(string $appId) { |
870 | 869 | } |
871 | 870 | return new \OC\Files\View('/' . OC_User::getUser() . '/' . $appId); |
872 | 871 | } else { |
873 | | - \OCP\Util::writeLog('core', 'Can\'t get app storage, app ' . $appId . ', user not logged in', ILogger::ERROR); |
| 872 | + \OCP\Server::get(LoggerInterface::class)->error('Can\'t get app storage, app ' . $appId . ', user not logged in', ['app' => 'core']); |
874 | 873 | return false; |
875 | 874 | } |
876 | 875 | } else { |
877 | | - \OCP\Util::writeLog('core', 'Can\'t get app storage, app ' . $appId . ' not enabled', ILogger::ERROR); |
| 876 | + \OCP\Server::get(LoggerInterface::class)->error('Can\'t get app storage, app ' . $appId . ' not enabled', ['app' => 'core']); |
878 | 877 | return false; |
879 | 878 | } |
880 | 879 | } |
|
0 commit comments