Skip to content

feat: Add file-based audit logging with rotation#878

Draft
gonzalesedwin1123 wants to merge 1 commit into17.0from
audit-logs-enhancements
Draft

feat: Add file-based audit logging with rotation#878
gonzalesedwin1123 wants to merge 1 commit into17.0from
audit-logs-enhancements

Conversation

@gonzalesedwin1123
Copy link
Copy Markdown
Member

  • Add configuration UI for file logging settings
  • Implement RotatingFileHandler with JSON Lines format
  • Support dual-mode: file or database logging
  • Skip chatter messages when file logging enabled
  • Add 15 comprehensive tests for all scenarios
  • Maintain full backward compatibility (defaults to DB mode)

Why is this change needed?

How was the change implemented?

New unit tests

Unit tests executed by the author

How to test manually

Related links

- Add configuration UI for file logging settings
- Implement RotatingFileHandler with JSON Lines format
- Support dual-mode: file or database logging
- Skip chatter messages when file logging enabled
- Add 15 comprehensive tests for all scenarios
- Maintain full backward compatibility (defaults to DB mode)
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

- JSON Lines format (one object per line)
- Default path: `/var/log/odoo/audit.log`
- Default rotation: 10MB per file, 5 backups
- Backward compatible: existing installations continue using database mode No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this file also intended to be in .gitignore?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants