Skip to content

Commit

Permalink
switch to new logger interface
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and PVince81 committed Sep 19, 2022
1 parent 0f617e7 commit d20b53b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,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;
Expand All @@ -108,7 +105,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'];
Expand Down Expand Up @@ -184,7 +181,7 @@ private function init() {
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
$this->logger->logException($e);
$this->logger->error($e->getMessage(), ['exception' => $e]);
}

if (!$this->nonMaskedStorage) {
Expand Down Expand Up @@ -559,7 +556,7 @@ public function getWrapperStorage() {
$this->nonMaskedStorage = $this->storage;
$this->cache = new FailedCache();
$this->rootPath = '';
$this->logger->logException($e);
$this->logger->error($e->getMessage(), ['exception' => $e]);
}

return $this->storage;
Expand Down

0 comments on commit d20b53b

Please sign in to comment.