Audit Log Implementation: Making the Trail a Product Feature, Not an Afterthought
Audit log implementation is the work of deciding what your product records about every change, who can read it, and how long it survives. In India it is no longer optional: the Companies (Accounts) Rules force an edit log into accounting software, CERT-In requires 180 days of ICT logs, and the DPDP Rules, 2025 add a year of their own.
Most teams arrive at this in the wrong order. The log gets bolted on after a dispute or a failed audit, by which point the events that mattered were never recorded. Designed up front, the same data stops being a compliance tax and becomes something users open on purpose: a versions tab, an approval route, a signature timestamp.
Why audit log implementation is now a legal requirement in India
Until a few years ago, logging was an engineering preference. Three Indian instruments changed that, and they arrived from three different directions. The Ministry of Corporate Affairs got there first. A proviso inserted into Rule 3(1) of the Companies (Accounts) Rules, 2014 says that for financial years commencing on or after 1 April 2023, every company using accounting software to maintain its books of account must use software that records “an audit trail of each and every transaction, creating an edit log of each change made in the books of account along with the date when such changes were made and ensuring that the audit trail cannot be disabled”. The date moved twice before it stuck, from 2021 to 2023, which is why some finance teams still treat it as a future problem. It is not. Rule 11(g) of the Companies (Audit and Auditors) Rules, 2014 puts the statutory auditor on the hook for reporting whether the feature existed, whether it ran all year for all transactions, whether it was tampered with, and whether the trail was preserved. ICAI’s revised implementation guide on reporting of audit trail reads that duty together with Section 128(5) of the Companies Act and concludes that the company needs to retain the audit trail for a minimum of eight financial years.
Then came security. Direction (iv) of the CERT-In Directions dated 28 April 2022 requires service providers, intermediaries, data centres, body corporates and government organisations to “mandatorily enable logs of all their ICT systems and maintain them securely for a rolling period of 180 days”, with those logs “maintained within the Indian jurisdiction” and produced to CERT-In alongside any incident report or on direction. The same instrument sets the six-hour incident reporting window that gets most of the attention, but the log clause is the one that dictates architecture.
Finally, privacy. Rule 6(1)(c) of the Digital Personal Data Protection Rules, 2025 lists appropriate logs, monitoring and review among the reasonable security safeguards a data fiduciary owes, specifically so unauthorised access can be detected and investigated. Rule 6(1)(e) then asks that those logs and the personal data be retained for one year unless another law in force requires otherwise, and Rule 8(3) sets a separate minimum of one year from the date of processing for fiduciaries covered by the Third Schedule. Rules 5 to 16 commence eighteen months after the Rules were notified in the Gazette dated 13 November 2025, which puts the deadline in the middle of 2027.
The three rules that decide your log design
Read side by side, the three obligations pull in different directions: immutability over eight years, breadth and Indian residency over six months, and enough detail to investigate a breach without turning the log into a second copy of everyone’s personal data.
| Instrument | What it asks for | Who it binds | How long |
|---|---|---|---|
| Rule 3(1) proviso, Companies (Accounts) Rules, 2014 | Audit trail of every transaction, edit log of each change with its date, and a trail that cannot be disabled | Every company keeping books of account in electronic mode, for financial years starting on or after 1 April 2023 | Eight financial years, read with Section 128(5) |
| Rule 11(g), Companies (Audit and Auditors) Rules, 2014 | Auditor reports whether the feature was used, ran all year for all transactions, was not tampered with, and was preserved | Auditors of all classes of companies, including Section 8 companies and foreign companies | Reported at every statutory audit |
| Direction (iv), CERT-In Directions, 28 April 2022 | Logs of all ICT systems enabled and maintained securely, produced to CERT-In with an incident report or on direction | Service providers, intermediaries, data centres, body corporates, government organisations | Rolling 180 days, within Indian jurisdiction |
| Rules 6(1)(c), 6(1)(e) and 8(3), DPDP Rules, 2025 | Appropriate logs, monitoring and review to detect unauthorised access, plus retention of those logs | Data fiduciaries, with Third Schedule fiduciaries carrying the separate Rule 8(3) duty | One year, unless another law in force requires otherwise |
The practical reading is simple. The financial trail is append-only and long-lived. Infrastructure and access logs are broad, Indian-resident and at least 180 days deep. The personal-data access log answers “who looked at this record and when”, kept a year and no longer. One undifferentiated log that tries to satisfy all three is how teams end up with a petabyte of noise and still cannot answer the auditor’s question, as any compliance portal built around verification workflows discovers.
What to log, field by field
ICAI’s guide is unusually specific here, and it is a good default even for products with nothing to do with books of account. It expects the trail to capture when changes were made, who made them and what data changed, and tells auditors to check that the log “captures the user ID that made the change, the date and time of change and what fields were changed”. It also asks that logging be enabled at the database level where applicable, so changes made outside the application are not invisible.
Translated into a schema, an event record that holds up later carries these fields:
- Actor. The user ID, not the display name, because names change. Store the role the actor held at that moment too, since a log that resolves roles at read time quietly rewrites history. This is where your log design and your role-based access control model stop being two decisions.
- Action and object. A stable verb and a stable object reference, both from a closed vocabulary. Free text here is how a log becomes unsearchable in year two.
- Before and after. The changed fields with old and new values, not the whole record, which turns the log into a second database.
- Timestamp. Stored in UTC, displayed in IST. Half the forensic arguments we have seen come down to two systems disagreeing about a clock.
- Context and outcome. Request ID, source IP, client, the reason where one is required, and whether the action succeeded. A log that records only successes cannot show the forty failed attempts before one success.
Two fields people leave out and regret: the reason string on destructive actions, captured in the product rather than reconstructed later from an email thread, and a record of reads on anything sensitive. A write log answers what changed. Only a read log answers the question a regulator or a client’s security reviewer will actually ask.
Inside Fagmil: activity, versions and an approval route on one screen
We built an e-Office management system for FCI Aravali Gypsum and Minerals India Limited, a public sector undertaking, replacing paper file movement with note creation, multi-level approvals, committee meetings with minutes and action items, and role-based access, in Hindi and English. In a government file workflow the trail is not a background feature, it is the product.
Open a note in the Fagmil e-Office build and the screen carries its own history. A note sheet sits under a reference of the form FAGMIL/MIN/NOTE/2026/001, with a file number beside it, and the header shows three chips at once: note type, version, and current status. Behind the document are two more tabs, Activity, with a count of events against it, and Versions. The trail is not buried in an admin console, it is one click from the thing it describes.
The details panel carries the forward-looking half of the same idea. An approval route lists each stage in order with the named officer and that stage’s state, so finance verification shows as pending with the reviewer named while the GM stage shows as upcoming. A separate document trail block states that approval and signature are recorded separately, and shows its own status. The user never has to ask who has it or what happens next.
The pattern repeats across the modules. Committee minutes carry a version number and the minutes writer’s name, behind a status chip reading “awaiting member signatures” until each signature lands with its own timestamp in IST. Action items are gated on minutes approval. Closing a committee requires a typed reason, and the screen says what that action will and will not cancel. The notification feed is simply the event stream rendered for humans: added to a committee at 1:07 pm, meeting scheduled at 1:10 pm, your turn to sign at 1:14 pm. None of it is exotic engineering. It is the same event table a developer would write for compliance reasons, exposed in the interface instead of hidden behind it.
Turning the trail into a feature people use
The gap between a compliance log and a product feature is mostly presentation, and four decisions close it.
Put the history where the object is. An activity tab on the record beats a global audit screen nobody opens. If a user must leave the invoice to learn what happened to the invoice, they will ask support instead.
Render events as sentences, not rows. “Priya moved this to finance verification on 4 Nov 2026, 3:44 pm IST” is read in a second. A table of actor_id, action_code and payload is not read at all. Keep the structured record underneath and let the interface translate.
Make status a first-class object. Chips like pending approval, held, awaiting member signatures or not requested are the compressed form of the trail. They are what a user checks forty times a day, and they only stay honest if they are derived from the event stream rather than stored as a separate editable field that can drift away from it.
Give it an export. Someone will eventually be asked for the trail by an auditor, a client or a counterparty. A filtered CSV or PDF export saves a developer writing a one-off query under time pressure, the most common way a log gets contaminated. Products that live on evidence, such as a secure deal room, treat that export as a headline feature.
Audit log implementation mistakes we see most often
The failures are repetitive enough to list.
Logging from the application layer only. If an engineer can connect to the production database and run an update, the application log shows nothing. ICAI’s guide expects database-level logging where applicable, and the argument applies well beyond accounting software.
Letting the log be editable by the people it watches. An append-only table enforced by the database, not by convention, is the minimum. Anything a privileged user can quietly rewrite is not evidence.
Mutable references. Logging a display name, a role name or a current price means the log reads differently next year. Store identifiers and the values as they stood.
Copying the whole payload. Dumping full request bodies duplicates personal data into a store with weaker access controls and a longer retention period than the primary one. Under the DPDP Rules that is a liability, not a safeguard.
No retention policy at all. Keeping everything forever is as much a failure as keeping nothing, because it means nobody decided. Different log categories run on different legal clocks, and those clocks should drive deletion.
Treating a notification feed as the log. Notifications are a view of some events, for some users, usually deleted or marked read. Useful surface, as the Fagmil feed shows, but not the record.
Retention, tiering and keeping the cost sane
With three clocks running, the workable approach is to classify each log stream, let the longest applicable clock govern it, and tier the storage behind that. In practice that means three tiers. Hot storage holds the window the product itself reads, typically the activity tab and the last few months, in your primary database or a search index. Warm storage covers the rest of the regulatory minimum, the 180-day CERT-In window and the one-year DPDP window, in object storage that is queryable but not indexed. Cold storage carries the long tail, including the eight-year accounting trail, in archival storage with integrity checks and a restore procedure that has actually been tested.
Two constraints to design in from the start. CERT-In requires the logs to be maintained within Indian jurisdiction, which rules out defaulting your log sink to a cheaper overseas region. And the DPDP clock runs opposite to the Companies Act clock: personal data in a log should age out at a year unless another law requires otherwise, while the financial trail must survive eight. One bucket with one lifecycle rule breaks one of the two.
An audit log implementation checklist
Run this before the first sprint, not after the first incident.
- List your log streams: financial, infrastructure and access, personal-data access, and product activity. Assign each an owner.
- Set a retention clock per stream from the applicable rule, not a default, and write down which rule drives it.
- Fix the event schema: actor ID, role at the time, action, object reference, changed fields with before and after values, UTC timestamp, request ID, source IP, reason where required, and outcome.
- Make the store append-only, enforced at the database, and confirm a privileged application user cannot update or delete rows.
- Enable database-level logging for direct data changes, so work done outside the application is still visible.
- Decide which objects get a user-facing activity tab and versions tab, and design those before the backend is frozen.
- Derive every status chip from the event stream rather than storing it as an independently editable field.
- Require a typed reason on destructive and irreversible actions, and store it as part of the event.
- Log reads on sensitive records, not only writes.
- Build the filtered export into the interface and test it against the question an auditor would actually ask.
- Confirm the log sink and its backups sit within Indian jurisdiction, then rehearse a restore from cold storage once and time it.
Most of these cost a few days during the build, and weeks of engineering when retrofitted. If you are scoping a product that will face a statutory auditor, a CERT-In request or a client’s security review, audit log implementation belongs in the first architecture document rather than the second year of the roadmap. That is the groundwork our custom software development team builds in from the start, and a far cheaper conversation to have now than after the first dispute.


[…] team asks for. Store it in an append-only table, not in the same row you are updating. Our guide to audit log implementation sets out the event schema and the retention clocks that make those records hold up […]