-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: include file id in audit logs #44871
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall
Sorry, don't feel confident enough to review this |
} catch (InvalidPathException|NotFoundException $e) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should still log something, maybe even on error level, so that this is not missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@come-nc logging the exception message as error in log file. I tried to delete a file that is already deleted from oc_filecache and also removed from data/admin/files/log.txt. I get a message in the UI saying "Delete file" action failed but i did not find it getting logged as a error message
Please also fix commit names, should not all start with |
|
||
/** | ||
* Log a error message with a log level of error | ||
* @param string $text | ||
*/ | ||
public function error(string $text): void { | ||
$this->logger->error($text, ['app' => 'admin_audit']); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this method, it makes thing unnecessiraly convoluted.
Inject the loggen in the child class if possible, use \OCP\Server::get
if not.
6ed0835
to
977bf8e
Compare
bc3e830
to
710f11d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
710f11d
to
7b0b54f
Compare
Signed-off-by: yemkareems <yemkareems@gmail.com>
7b0b54f
to
4d22880
Compare
Summary
nc.logs.txt
Checklist