AOP Audit Logging Framework
Log everything. Regret nothing.
A Spring AOP framework for automatic audit logging: method-level annotations, user/session context propagation, structured JSON logs, and a queryable audit trail. Drop into any Spring Boot app in an afternoon.
Tech stack
The Problem
Adding audit logging to existing endpoints is tedious, error-prone, and often skipped
Manual logging misses edge cases: exceptions, async calls, and batch operations
Compliance auditors ask for logs that were never collected
What's Included
Everything you need to ship production-grade code
@Audited Annotation
Annotate any method to capture before/after state, user, timestamp, and outcome.
Context Propagation
Automatic user/session/correlation-id injection from SecurityContext or MDC.
Structured JSON Logs
Every audit event is a typed JSON object, ready for Elasticsearch or CloudWatch.
Exception Capture
Failed operations are logged with stack trace summary — not silently dropped.
Queryable Audit Store
Optional JPA audit store with filtering by user, entity, action, and time range.
Get the Template
One-time payment. Full source code. Lifetime updates.
Personal License
- Full source code (Java/Spring)
- README + usage guide
- Test suite
- Lifetime updates
Frequently Asked Questions
Does this work with Spring Boot 3?
Yes. Compatible with Spring Boot 3.x and Jakarta EE namespace.
Can I store logs in a database instead of files?
Yes. The JPA audit store module is included alongside the file-based appender.