Affects Version/s: 3.40.1
Fix Version/s: 3.42.0
Sprint:NXRM Immortals Sprint 40, NXRM Immortals Sprint 41, NXRM Immortals Sprint 42, NXRM Immortals Sprint 43
Often administrators need to find which assets were deleted and why, and for this purpose, searching audit.log (and task logs) should be the correct place.
However, after migrating to External DB, audit.log does not log any deleted event by running the Cleanup service task.
- Install NXRM 3.40.1 with H2 or PostgreSQL
- Create a cleanup policy for "raw" format with ".*" asset name matcher
- Create "row-hosted" repo with above cleanup policy, then upload some file
- Run "Cleanup service" task manually.
audit/audit.log should record the "deleted" event for deleted components and assets which also includes the end user format relevant context about what actual asset was deleted ( not just some internal database id ).
Optionally, if the Cleanup service task logs the used cleanup policy detail with INFO level, that will be very helpful (NEXUS-34252)
audit/audit.log does not log any "deleted" event
NOTE: It does record "purged" with some internal ID, but this does not help administrators.
Also, repository.cleanup-20220719002142999.log does not say what was deleted
Build a project with this branch
Create a cleanup policy for "raw" format by Asset Name Matcher with ".*"
Create raw_hosted repo with your applied cleanup policy
Upload couple raw components
Chose System -> Tasks -> Cleanup service and hit Run
After a while some log files must appear in sonatype-work/nexus3/log/audit/ and sonatype-work/nexus3/log/tasks
audut.log must contain removed components in detail