Skip to content

Commit c9dcc89

Browse files
committed
switch to new logger interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 53de49b commit c9dcc89

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

apps/files_sharing/lib/SharedStorage.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
8888
/** @var string */
8989
private $user;
9090

91-
/**
92-
* @var \OCP\ILogger
93-
*/
94-
private $logger;
91+
private LoggerInterface $logger;
9592

9693
/** @var IStorage */
9794
private $nonMaskedStorage;
@@ -108,7 +105,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
108105

109106
public function __construct($arguments) {
110107
$this->ownerView = $arguments['ownerView'];
111-
$this->logger = \OC::$server->getLogger();
108+
$this->logger = \OC::$server->get(LoggerInterface::class);
112109

113110
$this->superShare = $arguments['superShare'];
114111
$this->groupedShares = $arguments['groupedShares'];
@@ -184,7 +181,7 @@ private function init() {
184181
$this->nonMaskedStorage = $this->storage;
185182
$this->cache = new FailedCache();
186183
$this->rootPath = '';
187-
$this->logger->logException($e);
184+
$this->logger->error($e->getMessage(), ['exception' => $e]);
188185
}
189186

190187
if (!$this->nonMaskedStorage) {
@@ -559,7 +556,7 @@ public function getWrapperStorage() {
559556
$this->nonMaskedStorage = $this->storage;
560557
$this->cache = new FailedCache();
561558
$this->rootPath = '';
562-
$this->logger->logException($e);
559+
$this->logger->error($e->getMessage(), ['exception' => $e]);
563560
}
564561

565562
return $this->storage;

0 commit comments

Comments
 (0)