Quick answer
An audit log is a chronological, protected record of actions that matter for accountability: who did what, to which object, when, from where and with what result. It is kept so events can be reconstructed later, and is guarded against quiet editing or deletion.
What is an audit log?
An audit log is a chronological record of actions in a system that matter for accountability: who did what, to which object, when, from where and with what result. Its purpose is to let someone reconstruct events afterwards, for example to answer "who changed this permission on Tuesday?" or "did anyone export the customer list?".
NIST's security control catalogue, SP 800-53, states the requirement in control AU-3: audit records must establish what type of event occurred, when it occurred, where it occurred, the source of the event, its outcome, and the identity of any individuals, subjects or objects associated with it.
Two properties separate an audit log from ordinary diagnostic output. The entries are selected in advance because someone will need them as evidence, and they are protected so that the people whose actions are recorded cannot quietly rewrite them.
What should an audit log record?
| AU-3 element | Typical field | Example value |
|---|---|---|
| What type of event | action | member.role_changed |
| When | time, in UTC with offset | 2026-12-01T09:14:02Z |
| Where | service or component | admin-console |
| Source | ip, device or calling system | 203.0.113.7 |
| Outcome | result | success or failure |
| Identity | actor and target | ana@example.com → user:42 |
For changes, add the before and after values (viewer → admin); "role changed" alone does not tell you whether someone gained or lost access. For times, NIST control AU-8 asks for timestamps from internal clocks that use UTC or carry the offset from it. If servers disagree about the time, the order of events across them cannot be trusted.
Deciding which events to log is a separate step. NIST control AU-2 mentions password changes, failed logons, changes to security or privacy attributes and use of administrative privileges among the event types, and asks organizations to say why the chosen set is enough to support investigations. NIST SP 800-92 gives similar examples of audit records in operating systems: successful and failed authentication attempts, file accesses, policy changes, account changes and use of privileges.
Audit log example
Sample data, four entries from an admin system:
| Time (UTC) | Actor | Action | Target and change | Result | Source IP |
|---|---|---|---|---|---|
| 2026-12-01 09:14:02 | ana@example.com | member.role_changed | user:42, viewer → admin | success | 203.0.113.7 |
| 2026-12-01 09:20:41 | ana@example.com | export.created | project:7, CSV | success | 203.0.113.7 |
| 2026-12-01 22:03:10 | unknown | login.failed | user:42, bad password | failure | 198.51.100.23 |
| 2026-12-01 22:03:58 | ben@example.com | login.succeeded | user:42 | success | 198.51.100.23 |
Read together, the rows raise a question that no single row does. An account was promoted in the morning; that evening someone failed once and then signed in to it, from an address that appears nowhere earlier in these rows. That may be the owner mistyping a password at home. It is still worth a check, because the account now has admin rights. The log supplies the facts; a person supplies the judgement.
Audit log vs application log vs access log
| Audit log | Application log | Access log | |
|---|---|---|---|
| Question | Who did what, and was it allowed? | Why did the software behave this way? | Which requests reached the server? |
| Main reader | Security, compliance, account owners | Developers and operations | Operations, SEO and security |
| Entries | Selected actions with actor and target | Errors, warnings, debug traces | One line per request |
| Edits and deletion | Restricted and detectable | Rotated freely | Usually rotated on a schedule |
| Typical content | role changed, export created | stack trace, retry count | URL, status code, user agent |
One event can feed all three: a failed export appears as a request in the access log, an exception in the application log and a failure entry in the audit log. Server access logs have other uses, such as log file analysis for SEO. Deciding who owns each log, who may read it and how long it lives belongs to data governance.
How long should audit logs be kept?
NIST SP 800-92 (2006), the Guide to Computer Security Log Management, gives example policy settings by system impact level and says organizations should not adopt them as they are but use them as a starting point:
| Setting (example) | Low impact | Moderate impact | High impact |
|---|---|---|---|
| How long to retain log data | 1 to 2 weeks | 1 to 3 months | 3 to 12 months |
| Integrity checking of rotated logs | Optional | Yes | Yes |
| Encryption of rotated logs | Optional | Optional | Yes |
The same guide notes that these examples do not include requirements from laws and regulations, which may be considerably higher, and that preservation for an investigation should override the standard period. NIST SP 800-53 AU-11 leaves the number to the organization: long enough to support after-the-fact investigations and to meet regulatory retention requirements. A revision of SP 800-92 has been in public draft since October 2023. This is general information, not legal advice; check the rules that apply to your sector and country as of the date you write your policy.
Storage is rarely the obstacle for audit records. Sample estimate: 40 staff × 25 audited actions a day = 1,000 entries a day. At 800 bytes per entry that is 0.8 MB a day and about 292 MB a year. The harder question is personal data: entries name people, so keeping them longer than you can justify is its own risk. Record the period and the reason in your data retention policy.
How to make an audit log tamper-evident
NIST control AU-9 requires protecting audit information and logging tools from unauthorized access, modification and deletion, and alerting named people when any of these is detected. SP 800-92 describes log file integrity checking: calculate a message digest of each archived file and store the digest securely, so later changes are detected.
A digest changes completely when the input changes. One way to apply this record by record is a hash chain, where each digest covers the previous digest plus the new line. Sample lines:
2026-12-01T09:14:02Z,ana@example.com,member.role_changed,user:42,viewer->admin,success,203.0.113.7
2026-12-01T09:20:41Z,ana@example.com,export.created,project:7,csv,success,203.0.113.7
2026-12-01T22:03:10Z,unknown,login.failed,user:42,bad_password,failure,198.51.100.23
With SHA-256, starting from 64 zeros and hashing "previous digest + line" (first 16 hex characters shown):
| Entry | Chain digest of the original log | After changing viewer->admin to viewer->viewer in entry 1 |
|---|---|---|
| 1 | 2fd2f7cad06fd74c | c4049bb57a42544d |
| 2 | cb7195e6a4483410 | ddb5913c45a832c4 |
| 3 | 22e5f72d246e3829 | 73ac5e3c70e39a7d |
Editing the first line changes every later digest. The chain only helps if a copy of a recent digest sits somewhere the editor cannot reach; otherwise they can recompute the whole chain. Practical measures, drawn from NIST and the OWASP Logging Cheat Sheet:
- Send entries to a separate system as they are written, so an administrator of the source cannot erase the only copy.
- Store or copy to read-only or write-once storage where the risk justifies it.
- Restrict who can read the log, review that list, and record access to the log itself.
- Alert when logging stops: a silent gap is also a form of tampering.
What to keep out of an audit log
A log that contains secrets becomes a target. The OWASP Logging Cheat Sheet advises that the following should usually be removed, masked, hashed or encrypted instead of written directly:
| Do not write | Write instead |
|---|---|
| Passwords | Nothing; record that a password was changed |
| Access tokens and API keys | A key ID or the last few characters |
| Session identifiers | A hashed value if you need to link events |
| Sensitive personal data such as health or government identifiers | An internal record ID |
| Whole request bodies from forms | The names of the fields that changed |
Names and IP addresses are often needed for accountability, but they are personal data. Limit them to what the investigation purpose needs; what counts is covered under PII.
Audit logs in TapCub
TapCub keeps an audit log of actions in its own console. It is not a log management or SIEM product for your servers. Take the question in the example, "who raised this person's role, and did anyone export data afterwards?":
- Open the log. Go to Configuration › Settings › Audit log. Adding, changing and removing members, turning two-step verification on or off, using a recovery code and changing privacy settings are written there. The groups are members and permissions, site and privacy, data governance, export and login.
- Narrow to the group. Check the members and permissions entries for the role change, then the export entries for what followed.
- Export for the record. Download CSV, NDJSON or JSON, at most 50,000 rows at a time, and keep it with the incident notes.
- Stream a copy elsewhere. The owner or an admin can turn on Real-time audit log push on the same tab: a webhook with a JSON body (with a signing secret, the
X-Webhook-Signatureheader carries an HMAC-SHA256 of the body to verify) or syslog over UDP in RFC 5424 format. A failed push is retried at most twice, so reconcile with an export from time to time.
Sources
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.