diff options
Diffstat (limited to 'apps/files_sharing/lib/SharedStorage.php')
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 5243c8d1594..759394f22e6 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -54,6 +54,7 @@ use OCP\Files\Storage\IDisableEncryptionStorage; use OCP\Files\Storage\IStorage; use OCP\Lock\ILockingProvider; use OCP\Share\IShare; +use Psr\Log\LoggerInterface; /** * Convert target path to source path and pass the function call to the correct storage provider @@ -80,10 +81,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto /** @var string */ private $user; - /** - * @var \OCP\ILogger - */ - private $logger; + private LoggerInterface $logger; /** @var IStorage */ private $nonMaskedStorage; @@ -100,7 +98,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto public function __construct($arguments) { $this->ownerView = $arguments['ownerView']; - $this->logger = \OC::$server->getLogger(); + $this->logger = \OC::$server->get(LoggerInterface::class); $this->superShare = $arguments['superShare']; $this->groupedShares = $arguments['groupedShares']; @@ -173,7 +171,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto $this->storage = new FailedStorage(['exception' => $e]); $this->cache = new FailedCache(); $this->rootPath = ''; - $this->logger->logException($e); + $this->logger->error($e->getMessage(), ['exception' => $e]); } if (!$this->nonMaskedStorage) { |