aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2025-04-02 12:37:25 +0200
committerLouis Chemineau <louis@chmn.me>2025-04-07 12:48:55 +0200
commitb90c7b36fbeca6c7346dc08bfe26f76c89a235b9 (patch)
tree99f40bacfef2452424541de022ce195b23d8f8a3 /apps/files_trashbin/lib
parentb03ffab5f0f39139c71cb2b8c370ca3f3d1ad391 (diff)
downloadnextcloud-server-b90c7b36fbeca6c7346dc08bfe26f76c89a235b9.tar.gz
nextcloud-server-b90c7b36fbeca6c7346dc08bfe26f76c89a235b9.zip
chore(files_trashbin): Add user details in log from Trashbinartonge/chore/increase_log_in_trashbin
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/Trashbin.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index e79fa2c9def..1951379cfcb 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -880,7 +880,13 @@ class Trashbin implements IEventListener {
foreach ($files as $file) {
if ($availableSpace < 0 && $expiration->isExpired($file['mtime'], true)) {
$tmp = self::delete($file['name'], $user, $file['mtime']);
- Server::get(LoggerInterface::class)->info('remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', ['app' => 'files_trashbin']);
+ Server::get(LoggerInterface::class)->info(
+ 'remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota) for user "{user}"',
+ [
+ 'app' => 'files_trashbin',
+ 'user' => $user,
+ ]
+ );
$availableSpace += $tmp;
$size += $tmp;
} else {
@@ -911,16 +917,20 @@ class Trashbin implements IEventListener {
$size += self::delete($filename, $user, $timestamp);
$count++;
} catch (NotPermittedException $e) {
- Server::get(LoggerInterface::class)->warning('Removing "' . $filename . '" from trashbin failed.',
+ Server::get(LoggerInterface::class)->warning('Removing "' . $filename . '" from trashbin failed for user "{user}"',
[
'exception' => $e,
'app' => 'files_trashbin',
+ 'user' => $user,
]
);
}
Server::get(LoggerInterface::class)->info(
- 'Remove "' . $filename . '" from trashbin because it exceeds max retention obligation term.',
- ['app' => 'files_trashbin']
+ 'Remove "' . $filename . '" from trashbin for user "{user}" because it exceeds max retention obligation term.',
+ [
+ 'app' => 'files_trashbin',
+ 'user' => $user,
+ ],
);
} else {
break;