Rename existing audit log file

Description

Problem statement (Why?)

The upstream version renames the existing audit log file if already exists to same name with a timetstamp:

That is not the case for psmdb:

The psmdb will open the same file in append mode regardless of the current/previous format. This means the BSON data could be appended to JSON file and vice-versa.

Solution (What?)

  • Pre-requisite: research how log rotation impacts that change

  • Inspect and change our audit logs rotation

The existing audit log file mode should be renamed with a timestamp as a postfix - as done by the upstream version.

The log files are moved here:

Acceptance criteria

The solution meets all functional requirements, passes unit and integration tests, and does not introduce regressions in existing functionality

QA and Docs

  • Describe audit log rotation rules

  • Adjust automated tests

Environment

None

Activity

Details

Assignee

Reporter

Labels

Needs QA

Yes

Needs Doc

Yes

Story Points

Priority

Smart Checklist

Created March 12, 2025 at 4:04 PM
Updated March 25, 2025 at 2:00 PM