Skip to content

feat: allow for exporting better audit logs from plik#538

Closed
iayouaz wants to merge 1 commit intoroot-gg:masterfrom
iayouaz:dev/audit_log
Closed

feat: allow for exporting better audit logs from plik#538
iayouaz wants to merge 1 commit intoroot-gg:masterfrom
iayouaz:dev/audit_log

Conversation

@iayouaz
Copy link
Copy Markdown

@iayouaz iayouaz commented Jul 23, 2025

Actual plik logs are not enough for a proper abuse system.
This adds a new logger that can be enabled by specifying a path in AuditLogPath in the config file.
The logger is using a standard timestamp with timezone and milliseconds.
The logs are easier to parse.

Log example:

[2025-07-23T04:23:33.171-04:00] user_id: local:username, user_login: username, user_email: , file_name: a.test, file_md5: f256e2aaafbf7358fdde734c1f263fb2, file_size: 161, mime_type: text/html; charset=utf-8, upload_id: qbhoDOt1RqmtW6jt, upload_login: , upload_ttl: 2592000, upload_upload_token: Yt6JmfsTSyh3ZUrav0zAETcyJFekPCU6, upload_ip_src: 127.0.0.1, method: GET, uri: /file/qbhoDOt1RqmtW6jt/5fLEnTb4qrx3JwlN/a, status_code: 301, ip_src: 127.0.0.1

The logs should not leak any secret like password or private token nor the file content.

@camathieu camathieu self-assigned this Dec 5, 2025
@camathieu camathieu modified the milestones: 1.3.8, 1.3.9 Dec 5, 2025
@camathieu camathieu modified the milestones: 1.3.9, 1.4 Feb 12, 2026
@camathieu camathieu closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants