Join us
@abhilashjn85 ・ Apr 30,2025 ・ 4 min read・ 588 views ・ Originally posted on faun.pub
Audit Log is basically all sort of records that corresponds to any changes within the application. Most importantly, while designing an audit log service we should understand what fields to audit when an event occurs. The information included in the log should provide the context of the event, the “who, what, where, and when,” and anything else of relevance.
Background
Audit Log should be capable of storing complete track records of your system’s operations. These audit logs can give an administrator invaluable insight into what behavior is normal and what behavior isn’t. Also, this can be useful in identifying whether a system component is misconfigured or likely to fail.
There are multiple reasons why we need an audit log are as follows -
Approaches
Let’s deep dive into various approaches for audit log service. There are a couple of approaches, and each has its own pros & cons some of which are listed below -
1.Custom Audit Log Service
pros
cons
pros
cons
Design Flow diagram would look something as -
pros
cons
PROS
CONS
Inference
While designing the Audit Log Service, we evaluated the above approaches and choose the “Spring Boot — Javers” approach. The selection of the right approach will largely depend upon the nature of the application. Our application is a Spring-based Microservice, traffic lies under the Medium bucket plus we needed faster development.
Note: Before designing the Audit Log, it is very important to get the requirements from the ground team and know the existing problem that they are facing in absence of an audit feature. This will help to identify extra metadata information like Ip Address, browser detail, user_meta_info, etc. Such metadata needs to be captured and stored along with regular audit logs.
Join other developers and claim your FAUN account now!