-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Description
Currently, audit events are only logged to the console via slog. We need to add the ability to persist audit logs to the database and give admins control over where audit events are sent.
Requirements
Database persistence
- Add an
audit_logstable (all supported DBs: SQLite, MySQL, PostgreSQL, MSSQL) to store event name, JSON details, and timestamp. - Write audit events to this table when database logging is enabled.
- Add a background worker to delete audit logs older than the configured retention period.
Configurable logging targets
- Add two independent settings toggles: log to console and persist to database (both can be enabled simultaneously).
- Add a configurable retention period in days (0 = infinite retention).
- Add admin API endpoints to get and update these settings.
Admin console UI
- Add an Audit log settings page to configure the logging targets (console, database) and retention period.
- Add a separate Audit log viewer page to browse stored audit logs with event type filtering, paginated table, and JSON detail display.
- Add both pages as separate entries in the admin navigation menu.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels