aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-09-19 16:06:40 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-09-21 11:57:21 +0200
commit0a9371f99f05786068d6f6a72b9a717ec24690a8 (patch)
tree90ae93c3e608e2bf90a1ed0a54defb053d3e86ef /apps/files
parentb6761fbc967bd165279ca20af8c05cae045267d4 (diff)
downloadnextcloud-server-0a9371f99f05786068d6f6a72b9a717ec24690a8.tar.gz
nextcloud-server-0a9371f99f05786068d6f6a72b9a717ec24690a8.zip
Migrate applications away from deprecated ILogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/DirectEditingViewController.php26
1 files changed, 9 insertions, 17 deletions
diff --git a/apps/files/lib/Controller/DirectEditingViewController.php b/apps/files/lib/Controller/DirectEditingViewController.php
index 0741b58cfe9..b2a9b780b34 100644
--- a/apps/files/lib/Controller/DirectEditingViewController.php
+++ b/apps/files/lib/Controller/DirectEditingViewController.php
@@ -30,27 +30,19 @@ use OCP\AppFramework\Http\Response;
use OCP\DirectEditing\IManager;
use OCP\DirectEditing\RegisterDirectEditorEvent;
use OCP\EventDispatcher\IEventDispatcher;
-use OCP\ILogger;
use OCP\IRequest;
+use Psr\Log\LoggerInterface;
#[IgnoreOpenAPI]
class DirectEditingViewController extends Controller {
-
- /** @var IEventDispatcher */
- private $eventDispatcher;
-
- /** @var IManager */
- private $directEditingManager;
-
- /** @var ILogger */
- private $logger;
-
- public function __construct($appName, IRequest $request, IEventDispatcher $eventDispatcher, IManager $manager, ILogger $logger) {
+ public function __construct(
+ $appName,
+ IRequest $request,
+ private IEventDispatcher $eventDispatcher,
+ private IManager $directEditingManager,
+ private LoggerInterface $logger,
+ ) {
parent::__construct($appName, $request);
-
- $this->eventDispatcher = $eventDispatcher;
- $this->directEditingManager = $manager;
- $this->logger = $logger;
}
/**
@@ -66,7 +58,7 @@ class DirectEditingViewController extends Controller {
try {
return $this->directEditingManager->edit($token);
} catch (Exception $e) {
- $this->logger->logException($e);
+ $this->logger->error($e->getMessage(), ['exception' => $e]);
return new NotFoundResponse();
}
}