From 774928bcbe060355f6dfe6003cdb741f5f367d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 3 Jun 2025 09:35:23 +0200 Subject: [PATCH] fix(files_versions): Log failure to compute node path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid hidden bugs, add some debug logging when a node path cannot be computed from a received event, to have more information for debugging Signed-off-by: Côme Chilliet --- .../lib/Listener/FileEventsListener.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/files_versions/lib/Listener/FileEventsListener.php b/apps/files_versions/lib/Listener/FileEventsListener.php index 6a2e82002de..e0db484cd94 100644 --- a/apps/files_versions/lib/Listener/FileEventsListener.php +++ b/apps/files_versions/lib/Listener/FileEventsListener.php @@ -443,6 +443,24 @@ class FileEventsListener implements IEventListener { } } + try { + $this->logger->debug('Failed to compute path for node', [ + 'node' => [ + 'path' => $node->getPath(), + 'owner' => $owner, + 'fileid' => $node->getId(), + 'size' => $node->getSize(), + 'mtime' => $node->getMTime(), + ] + ]); + } catch (NotFoundException) { + $this->logger->debug('Failed to compute path for node', [ + 'node' => [ + 'path' => $node->getPath(), + 'owner' => $owner, + ] + ]); + } return null; } }