onedata/onedata

log mechanism implemented?

Closed this issue · 1 comments

greeting! @lopiola,

I am wondering if onedata has implemented any sort of log mechanism(such as .log file in onezone) to keep track of file-related operations such as file deleting, creating.

any guidelines will be appreciated!

Hello, we do have a rudimentary mechanism for that, it's on the level of the Oneprovider service (Onezone does not handle file operations). You can turn it on by overriding an ENV variable in op_worker's overlay.config:

[
    {op_worker, [
        {file_access_audit_log_enabled, true}
    ]}
].

Logs will appear in /var/log/op_worker/file_access_audit.log and will be rotated with max count of 10 log files (suffixes with numbers will be added).

We do plan to implement more advanced file access audit logs with better configurability and a REST API, but it's a future work. For now, you should be able to work something out with this one.