aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-04-03 17:48:40 +0200
committerRobin Appelman <robin@icewind.nl>2025-04-03 17:58:46 +0200
commitc3f06b370c69bfe121eeac6797550e6ce177556b (patch)
tree55bf0e8f68e33b0da2a235cdd66e9bd513ffd3ec
parent807958448385880938cf5ce15a9dae65c3da29c8 (diff)
downloadnextcloud-server-usermountcache-logging.tar.gz
nextcloud-server-usermountcache-logging.zip
feat: add debug logging for adding/removing items from the user mounts cacheusermountcache-logging
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Files/Config/UserMountCache.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 7d9ecc16f76..9c1e2314262 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -98,15 +98,18 @@ class UserMountCache implements IUserMountCache {
$userUID = $user->getUID();
try {
foreach ($addedMounts as $mount) {
+ $this->logger->debug("Adding mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->addToCache($mount);
/** @psalm-suppress InvalidArgument */
$this->mountsForUsers[$userUID][$mount->getKey()] = $mount;
}
foreach ($removedMounts as $mount) {
+ $this->logger->debug("Removing mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->removeFromCache($mount);
unset($this->mountsForUsers[$userUID][$mount->getKey()]);
}
foreach ($changedMounts as $mount) {
+ $this->logger->debug("Updating mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->updateCachedMount($mount);
/** @psalm-suppress InvalidArgument */
$this->mountsForUsers[$userUID][$mount->getKey()] = $mount;