Business Audit log - recommended library or approach?

krtek picture krtek · Sep 23, 2010 · Viewed 17.5k times · Source

do you know any good Java library for audit logging? Or at least good book/article to help choose good approach to build audit log for an application?

Library requirements:
- define common audit metadata (userId, time, IP, ...)
- define audit message types (transaction sent, message received, ...)
- lock/sign individual audit messages (for non-repudiation)
- search audit log based on metadata
- etc.

Edit:
I'm not looking for automated solution, I'm perfectly happy with calling something like:

AuditEvent event = new TransactionSentEvent(userId, account, amount, ...)
AuditLog.audit(auditEvent);

The point is to have the infrastructure behind it - safe storage to database, non-reputability etc.

Answer

jkl picture jkl · Oct 29, 2010

So, if you are looking for a framework, you could try logback-audit. It is by the folks who are behind the Java logging library, logback.