mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore(files_trashbin): Add user details in log from Trashbin
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
b03ffab5f0
commit
b90c7b36fb
1 changed files with 14 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue