Home
Home/resources/what is audit logging
Ed25519 signaturesSHA-256 hashes8 SDKs
Status
Sign inStart free
Home
SecurityAudit LogsAudit TrailSecurity Reviews

What Is Audit Logging? A Plain Guide to Audit Logs and Audit Trails

Audit logging is recording who did what, to what, when and from where, and keeping that record for someone who was not there. Here is what goes in an audit event, what to record, what the rules actually ask for, and the question most guides skip: how anyone can tell the log has not been changed.

Start freeRead the quick start
10,000 signed audit events a month on the free plan. No card.
Adeola OkunolaFounder, Invoance30 October 2026·9 min read
Summarize with ClaudeSummarize with ChatGPTSummarize with Google AISummarize with Perplexity
On this page
  1. What audit logging is
  2. What one audit event records
  3. What to record
  4. Audit logs, application logs and SIEMs
  5. Who reads an audit log, and why
  6. What the rules actually ask for
  7. The weak point: who can change the log?
  8. How to set it up well
  9. How Invoance Audit Logs does it

What audit logging is

Audit logging is the practice of recording who did what, to what, when and from where, and keeping that record so someone else can read it later. An audit log is the record itself: a time-ordered list of events, one entry per action. An audit trail is what you get by following those entries for one thing, such as the history of a single user, invoice or permission. Most people use the two terms interchangeably, and that is usually fine.

The important words are "someone else". An application log is written for the engineer fixing a bug. An audit log is written for a reader who was not there and has no reason to take your word for it: a customer's security team, an auditor, an investigator, the other side in a dispute. Almost everything that makes an audit log good follows from that reader.

What one audit event records

A useful event can be read on its own, a year later, by someone who has never seen your product. That means it answers a short list of questions without needing a lookup in another system.

Two details separate a strong entry from a weak one. The actor is a specific person, API key or service, because a record that says "admin" or "system" cannot hold anyone to account. And a change states what it changed from and to, because the value of the entry is often in the difference.

Inside one audit event

member.role.updated
actor.type: "user"actor.id: "user_2207"
Who

One named person, API key or service. A shared account answers nothing.

action: "member.role.updated"
Did what

A stable name from a fixed list, so every role change can be found with one search.

targets[0]: { "type": "member", "id": "user_481" }
To what

The thing that changed, by ID, so the entry still means something after a rename.

occurred_at: "2026-10-30T09:41:12.000Z"
When

In UTC, set by your server. A time from the browser is only the browser's opinion.

context.location: "203.0.113.24"context.user_agent: "Mozilla/5.0"
From where

Where the request came from: the first thing an investigator asks.

metadata.from: "viewer"metadata.to: "admin"
What changed

Before and after. "Role updated" tells a reader far less than "viewer to admin".

seq: 4818payload_hash: "9f2c71e4…a03d"signature: "mN3xQ8vT…Lw=="
Why anyone should believe it

Added on arrival, not sent by your app. Most audit logs stop one row earlier.

Your application sends the first six rows; the last is written when the event is stored.
One made-up event, field by field. The last row is what lets a reader check the others.

What to record

You will not record everything, and you do not need to. Start with the actions that change who can do what, what leaves the system, and what your customers would be upset to find out about afterwards.

CategoryExamplesWhy it gets asked about
AccessSign-ins, failed sign-ins, password resets, MFA changesShows how an account was used, and the attempts on it
PermissionsRole changes, invitations, API keys created or revokedMost incidents and most reviews turn on who could do what
DataExports, bulk downloads, views of sensitive records, deletionsShows what left the system, and who took it
ConfigurationSSO settings, security policies, webhooks, retentionTurning a control off is an event in its own right
Business actionsRefunds, payouts, approvals, contract changesDisputes start here
The log itselfLog exports, retention changes, who opened the viewerSooner or later someone asks who touched the evidence
Record failures as well as successes: a refused request is often the more interesting entry. Leave out passwords, tokens and full card numbers, and keep personal data to what the entry needs. This is a record you plan to keep for a long time and show to other people.

Audit logs, application logs and SIEMs

These get confused because they are all "logs", and because they often end up in the same tool. They do different jobs.

Application logAudit logSIEM
Question it answersWhat went wrong in the system?Who did what, and can we show it?Is something suspicious happening now?
Main readerEngineersAuditors, customers, investigatorsSecurity analysts
What it holdsErrors, traces, debug outputOne structured entry per actionLogs gathered from many systems
Typical lifetimeDays or weeksMonths or yearsSet by budget and policy
If an entry is lostA harder debugging sessionA hole in your evidenceA possible missed alert
A longer retention period does not turn an application log into an audit log, and a SIEM does not fix weak events. If your product writes vague entries, a SIEM stores vague entries.

Who reads an audit log, and why

A customer's security reviewer. If you sell software to larger companies, the question appears in the security questionnaire: do you provide audit logs, can our admins see them, can we export them? A good answer can shorten a review. "We can pull that from a database if you ask" rarely helps.

An auditor. A SOC 2 or ISO 27001 auditor wants to see that a control worked throughout a period, not just that it exists today. Log entries are often how you show it.

Whoever is handling an incident. Once something has gone wrong, the first job is a timeline: which account, which actions, in what order, and what they touched. Without one, the team has to assume the worst about what was reached.

You, in a dispute. A customer says nobody on their team changed a setting, and now invoices have gone to the wrong place. If the log shows which of their users changed it and when, the conversation ends quickly. If it does not, it is your word against theirs.

What the rules actually ask for

Guides often say a framework "requires audit logs" as if they all meant the same thing. They do not. This is a summary, not advice, so confirm the detail with your auditor or counsel.

FrameworkWhat it asks forHow long to keep it
PCI DSS v4, Requirement 10Log access to system components and cardholder data, and protect the logs from being changed12 months, with the latest 3 immediately available (10.5.1)
HIPAA Security Rule, 45 CFR 164.312(b)Mechanisms that record and examine activity in systems holding electronic health informationNot stated in this standard
SOC 2 (CC7.2 and related criteria)No fixed log format. The auditor looks for evidence that systems were monitored across the periodYour own policy, at least the audit period
ISO/IEC 27001:2022, Annex A 8.15Produce, store, protect and analyse logs of activity and exceptionsYour own policy
GDPRDoes not name audit logs. They are a common way to meet accountability (Art. 5(2)) and security (Art. 32)No longer than necessary for personal data (Art. 5(1)(e))
Two things stand out. Retention is usually yours to set, so the number that binds you is more often in your policy or a customer contract. And the word "protect" keeps appearing: keeping a log is the easy half.
  • 45 CFR 164.312 The HIPAA technical safeguards, including audit controls.

The weak point: who can change the log?

Most audit logs are rows in a database that the vendor runs. Its engineers can reach that database. So can an attacker with their credentials, and so can a migration with a bad WHERE clause. Restricting access is worth doing, but it is a promise about who will touch the log, and a reader outside your company has no way to check that promise.

That is the gap between a log you say is intact and a log that can show it. "Immutable" gets used for both. The more useful question is what would happen if someone changed a row, and who would find out.

Tamper evidence answers that with three checks, and each catches something the others miss. A signature on each event shows that event has not changed since it was signed, but says nothing about an event that has gone. A gap-free sequence number for each customer shows that an event is missing, but not that one was altered. A copy held outside the system catches both, and also the hardest case: the newest events removed and the counter rolled back to match.

Try it. In this log, someone promotes themselves to admin, creates an API key, exports the customer list and steps back down. Choose how they cover it up and see which checks notice.

Change the log, then run the checks

organization acme-prod · seq 4817 to 4822
  1. 4817session.createduser_2207sso
  2. 4818member.role.updateduser_2207viewer to admin
  3. 4819api_key.createduser_2207key_7Hq2
  4. 4820customers.exporteduser_220748,210 rows
  5. 4821member.role.updateduser_2207admin to viewer
  6. 4822session.endeduser_2207sso

Signatures

verifyAuditEvent, pinned key

Valid

6 of 6 verify

Sequence scan

audit.orgs.integrity()

Valid

Contiguous through 4822

Your stream copy

events you already received

Valid

Last seq 4822, rows match

Resetting the counter takes direct database access, not an API key.
What each check reports for each kind of change. No single check catches everything, which is why a good log has all three.

How to set it up well

Start from the questions, not the code. List the ten actions a customer's reviewer would ask about and cover those first. A short list that is complete beats a long list with holes.

Write the event on the server, in the same code path as the action. An entry sent from the browser can be blocked or faked, and one written by a job that runs later can go missing even though the action succeeded.

Pick one naming scheme and keep to it. Names like member.role.updated and billing.plan.changed stay searchable. Free-text messages do not.

Keep every event under the customer it belongs to, so one customer's admins can only ever see their own organization. Make retries safe with an idempotency key, so a redelivered request does not create a second entry.

Decide who reads it. A log nobody reads catches nothing. Alert on a small set of events, such as a new admin, MFA turned off or a bulk export, and review the rest on a schedule. Then test it: pick a real action from last month, find its entry and ask someone outside the team whether they can tell what happened.

  • How to build audit logs for a SaaS app The engineering guide, if you are building this yourself.
  • Reasons and best practices for audit logs More on the design decisions.

How Invoance Audit Logs does it

Invoance Audit Logs is built for software companies whose customers want to see activity in their own accounts. Your product sends an event for each action, under the customer organization it belongs to. Invoance assigns the next sequence number for that organization, signs the event with Ed25519 and stores it in a table where deletes are blocked.

Each customer gets a read-only portal or a viewer embedded in your product, with CSV and NDJSON exports and webhook streams to their own systems. That stream is the outside copy from the demo above. Anyone holding an event can verify it offline with the SDK, with no call to Invoance. Auth0 and Clerk integrations can forward identity events for you.

It is not a SIEM, and it does not collect logs from your cloud accounts. It records what your application sends. A signature shows an event has not changed since it was signed. It cannot show the event was true, or that your application recorded an action at all: an action that never sent an event leaves no gap.

Send an event, then verify it offline
import { InvoanceClient, verifyAuditEvent } from "invoance";

const client = new InvoanceClient();

const ev = await client.audit.events.ingest({
  organizationId: "org_01J8F3KQ2R7VWX9YB4ND6MCZAH",
  action: "member.role.updated",
  actor: { type: "user", id: "user_2207" },
});

// later, anywhere, with no network call
const event = await client.audit.events.get(ev.event_id);
console.log(verifyAuditEvent(event).valid); // true
  • Audit Logs What it does, who it is for and how it is priced.
  • How Audit Logs work The mechanism, step by step.
  • Audit event schema Every field, and exactly what the signature covers.

Start free: 10,000 signed audit events a month. The Developer plan needs no card and includes 2 customer organizations, 1 stream and 30 days retention: enough to try it on your own product.

Start freeRead the quick start
On this page
  1. What audit logging is
  2. What one audit event records
  3. What to record
  4. Audit logs, application logs and SIEMs
  5. Who reads an audit log, and why
  6. What the rules actually ask for
  7. The weak point: who can change the log?
  8. How to set it up well
  9. How Invoance Audit Logs does it
Adeola Okunola

Adeola Okunola

Founder, Invoance
About the author

I'm Adeola, founder of Invoance.

I build proof infrastructure for audit logs, AI attestations, and business records that need to stand up to security, compliance, and legal scrutiny.

Most systems document what happened. Invoance helps prove it.

All articles by Adeola
Related product

Audit Logs

Signed activity logs for each of your customers, with a viewer they can open themselves.

Open Audit Logs
Keep readingAll articles
AUDIT LOGSsha-256 · d7f8e167…01ee
Engineering13 min read

How to Build Audit Logs for a SaaS App: The Complete Engineering Guide

Most SaaS audit logs are just an events table with a timestamp, and they fall apart the moment someone has a reason to doubt them. This guide shows how to build audit logs that hold up: the schema, append-only storage, idempotent ingest, retention, and the tamper-evidence and verification layer that turns a log into evidence. Then where the build-versus-buy line actually is.

Adeola Okunola·22 June 2026Read
AUDIT LOGSsha-256 · 52e6deb0…9abd
Compliance7 min read

Why Traditional Audit Logs Fail Under Regulatory Scrutiny

Your application logs record what happened. But in an audit or legal proceeding, the first question is not what your logs say, it is whether anyone can trust your logs. Traditional logging has a fundamental integrity problem that most teams do not address until it is too late.

Adeola Okunola·26 February 2026Read
AUDIT LOGSsha-256 · 8be85c6d…99dc
Compliance13 min read

How to Export Audit Logs for Enterprise Customers: Signed, Verifiable, Audit-Ready

Any system can dump audit logs to a CSV. The problem is that a CSV is a file you are asking an auditor to trust. This guide shows how to export audit logs as signed, independently verifiable records: paginated from a real API, with a per-record Ed25519 signature and a gapless sequence that proves nothing was dropped or altered.

Adeola Okunola·22 June 2026Read

Start free: 10,000 signed audit events a month.

The Developer plan needs no card and includes 2 customer organizations, 1 stream and 30 days retention: enough to try it on your own product.

Start freeRead the quick start

Verified documents and records. Invoance records the exact version of every invoice, report and notice your company sends, so the people who receive them can confirm they have the version you sent, without taking your word for it.

Products

  • Evidence Rooms
  • Audit Logs
  • Event Ledger
  • AI Attestation
  • Document Anchoring
  • Traces

Developers

  • Documentation
  • API reference
  • SDKs
  • How it works
  • How traces seal
  • System status

Verify

  • Audit Log
  • Event
  • AI Attestation
  • Document
  • Trace

Company

  • Company overview
  • What is Invoance
  • Pricing
  • Security
  • Compliance teams
  • Finance teams
  • Partners
  • Brand assets
  • Resources
  • Help center
  • Contact
© 2025 – 2026 Invoance, Inc. All rights reserved.© 2026 Invoance, Inc. All rights reserved.
TermsPrivacyLegal noticeLegal FAQ