diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-31 16:51:29 +0300 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-05-02 11:52:44 +0300 |
commit | 5fb9de62488dec879de14f0bf2b703b7a9c3a1b7 (patch) | |
tree | a73a737ee17093cd8804a2df9b41748fd9231c25 /apps/dav/appinfo | |
parent | e2531f8503dea904dd1cb389ca017ce7bda5ccfc (diff) |
Migrate last instances of $server::getLogger() from dav
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav/appinfo')
-rw-r--r-- | apps/dav/appinfo/v1/caldav.php | 6 | ||||
-rw-r--r-- | apps/dav/appinfo/v1/carddav.php | 5 | ||||
-rw-r--r-- | apps/dav/appinfo/v1/publicwebdav.php | 2 | ||||
-rw-r--r-- | apps/dav/appinfo/v1/webdav.php | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php index 75400264f75..9036a30f95c 100644 --- a/apps/dav/appinfo/v1/caldav.php +++ b/apps/dav/appinfo/v1/caldav.php @@ -59,7 +59,7 @@ $principalBackend = new Principal( $db = \OC::$server->getDatabaseConnection(); $userManager = \OC::$server->getUserManager(); $random = \OC::$server->getSecureRandom(); -$logger = \OC::$server->getLogger(); +$logger = \OC::$server->get(LoggerInterface::class); $dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class); $legacyDispatcher = \OC::$server->getEventDispatcher(); $config = \OC::$server->get(\OCP\IConfig::class); @@ -84,7 +84,7 @@ $sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitation $principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend); $principalCollection->disableListing = !$debugging; // Disable listing -$addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend, 'principals', \OC::$server->get(LoggerInterface::class)); +$addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend, 'principals', $logger); $addressBookRoot->disableListing = !$debugging; // Disable listing $nodes = [ @@ -115,7 +115,7 @@ $server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin(\OC::$server->getConfig() if ($sendInvitations) { $server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class)); } -$server->addPlugin(new ExceptionLoggerPlugin('caldav', \OC::$server->getLogger())); +$server->addPlugin(new ExceptionLoggerPlugin('caldav', $logger)); // And off we go! $server->exec(); diff --git a/apps/dav/appinfo/v1/carddav.php b/apps/dav/appinfo/v1/carddav.php index 53449b91c4b..a0306118781 100644 --- a/apps/dav/appinfo/v1/carddav.php +++ b/apps/dav/appinfo/v1/carddav.php @@ -36,6 +36,7 @@ use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin; use OCA\DAV\Connector\Sabre\MaintenancePlugin; use OCA\DAV\Connector\Sabre\Principal; use OCP\App\IAppManager; +use Psr\Log\LoggerInterface; use Sabre\CardDAV\Plugin; $authBackend = new Auth( @@ -95,9 +96,9 @@ $server->addPlugin(new \Sabre\DAV\Sync\Plugin()); $server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin()); $server->addPlugin(new \OCA\DAV\CardDAV\ImageExportPlugin(new \OCA\DAV\CardDAV\PhotoCache( \OC::$server->getAppDataDir('dav-photocache'), - \OC::$server->getLogger() + \OC::$server->get(LoggerInterface::class) ))); -$server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->getLogger())); +$server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->get(LoggerInterface::class))); // And off we go! $server->exec(); diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index c99c5bcd833..43b472c107b 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -48,7 +48,7 @@ $authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend); $serverFactory = new OCA\DAV\Connector\Sabre\ServerFactory( \OC::$server->getConfig(), - \OC::$server->getLogger(), + \OC::$server->get(Psr\Log\LoggerInterface::class), \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession(), \OC::$server->getMountManager(), diff --git a/apps/dav/appinfo/v1/webdav.php b/apps/dav/appinfo/v1/webdav.php index 7b0a0ae11df..e39a6b48d57 100644 --- a/apps/dav/appinfo/v1/webdav.php +++ b/apps/dav/appinfo/v1/webdav.php @@ -39,7 +39,7 @@ ignore_user_abort(true); $serverFactory = new \OCA\DAV\Connector\Sabre\ServerFactory( \OC::$server->getConfig(), - \OC::$server->getLogger(), + \OC::$server->get(Psr\Log\LoggerInterface::class), \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession(), \OC::$server->getMountManager(), |