Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

A board-level incident review found the company could not reconstruct what happened during a customer data incident because key events were logged at DEBUG and turned off. How would you change the company's approach so this does not happen again, without logging everything?

The root cause is that security-relevant facts were treated as debug output. I would separate them: actions such as data access, permission changes and data exports become audit events, defined in a catalogue agreed with security and legal, recorded through a dedicated path with guaranteed delivery and their own retention, and tested. Operational logging can then stay lean, because audit no longer depends on log levels, and we prove it works by running regular reconstruction exercises and reporting audit coverage per system to leadership.

Why this question is asked

A board-level review that says 'we could not reconstruct what happened' is a serious finding. It means the company could not tell regulators, customers or itself who accessed which data and when. The tempting reaction is to log everything at INFO from now on, which multiplies cost and still does not guarantee the answer, because log lines can be dropped, sampled, truncated or deleted after 14 days. Interviewers ask this leadership question to see whether we can find the real design flaw and fix it without overreacting. In this answer, we will see why logs failed here, separate audit events from operational logs, define the audit catalogue with security and legal, build the delivery path, test reconstruction regularly and report coverage to leadership.

1Why Logs Failed in This Incident

Operational logs are designed for engineers debugging systems. Their levels can be changed at any time, they are often rate-limited or sampled, retention is short to control cost, and their format changes whenever a developer edits a message. All of that is correct for their purpose. But it means that any fact we must be able to prove later, such as 'user 4417 exported 12,000 customer records at 02:14', is in the wrong place if it lives only in a log line, and in the worst place if that line was written at DEBUG and turned off.

So the lesson is not 'log more'. It is that some events are records with legal and security value, and they need guarantees that logs do not provide.

2Separate Operational Logs From Audit Events

An audit event is a structured record of a security-relevant action: who did it (the user or service identity), what they did (the action), to what (the resource and data class), when, from where, and with what result. It is written on purpose, through an API made for it, not as a side effect of logging.

Java
// Operational log: for engineers, level-controlled, may be dropped
log.debug("Export query built with {} filters", filters.size());
// Audit event: for security and legal, always recorded
audit.record(AuditEvent.builder()
.actor("user:4417").action("customer.export")
.resource("segment:emea-active").dataClass("personal")
.outcome("success").count(12_000)
.build());
// written to the audit pipeline regardless of any logger level
Operational logs versus audit events
AspectOperational logsAudit events
Purposedebug and operate systemsprove who did what, when
Controlled bylog levels, filters, samplingnothing at runtime; always on
Deliverybest effort, may drop under loadguaranteed, retried, acknowledged
Schemaloose, changes with codeversioned catalogue, reviewed
Retentiondays to weeksset by legal, often years
Accessengineerssecurity, legal, auditors; read-only

Notice that the audit call does not go through a logger at all, so no level, filter or sampling rule can switch it off. In many companies it is an interface in the shared platform library backed by a durable queue.

3Define the Audit Event Catalogue

Engineers alone should not decide what must be audited. I would run a short working group with security, legal or privacy, and the owners of the main systems, and produce a catalogue: each event type with its name, its fields, the systems that must emit it, the owner, the retention period and why it exists. Typical entries are authentication and failed logins, access to personal or financial data, changes to roles and permissions, configuration changes to security controls, data exports and deletions, and administrative actions by support staff.

Each catalogue entry should come with a test. For example, an integration test that performs an export and asserts that exactly one customer.export audit event with the right actor and count was recorded. That turns the catalogue from a document into a contract the build checks.

4Build the Delivery Path With Guarantees

Audit events need delivery that operational logs do not have. The application writes the event to a durable buffer, often a Kafka topic with replication or a transactional outbox table written in the same database transaction as the action itself, so that the action and its audit record commit or fail together. A consumer moves events into an append-only store with restricted access and integrity protection, such as write-once storage or hash chaining, with the retention legal defines.

The important design decision is what happens if the audit path is down. For the most sensitive actions, such as bulk exports, the right answer is often to fail the action rather than perform it without a record. For lower-risk events, buffering locally and alerting is enough.

Step throughAudit event path
  1. Application actionexport, permission change, data access
  2. Audit API in platform libraryfixed schema from the catalogue
  3. Outbox table or replicated topiccommitted with the action
  4. Audit consumervalidates, enriches, deduplicates
  5. Append-only audit storerestricted access, legal retention, integrity checks

5 layers, from the top down. Step through them one at a time.

5Keep Operational Logging Lean

Once audit is separate, operational logging can stay at its sensible defaults: INFO for applications, WARN for frameworks, DEBUG only temporarily. That is the answer to 'without logging everything'. The board's concern is addressed by the audit path, and the log bill does not grow. We should still make sure operational logs carry the trace id and actor id at INFO for important business steps, so engineers can join the two sources during an investigation.

6Prove It With Exercises and Report Coverage

A design is only trustworthy if it is tested against the real question. I would run a reconstruction exercise each quarter: security picks a sample scenario, for example 'show every access to customer 88213's records in the last 90 days and who performed it', and the owning teams must answer it from the audit store within a set time, such as four hours. Gaps found in the exercise become catalogue or implementation work.

For leadership, I would report audit coverage as part of the security posture: the percentage of systems in scope that emit all their catalogue events, the results of the last exercise, and open gaps with owners and dates. That gives the board a measurable answer to 'could this happen again', instead of an assurance.

7Follow-up questions

Where would you store audit events?

In a store separate from the operational log platform, with append-only or write-once semantics, access limited to security, legal and auditors, and retention set by legal requirements, often several years. Options include object storage with object lock, a dedicated database with no update or delete permissions for applications, or a SIEM for the security-monitoring copy. The key properties are that applications cannot alter events after writing them, that access is itself audited, and that deletion follows a documented retention policy.

Is a transactional outbox necessary for every audit event?

Not for every one. It matters for actions where the audit record must exist if and only if the action happened, such as permission changes or data exports. For high-volume read access events, writing to a replicated topic with retries is usually enough, accepting a very small risk of loss that is monitored.

How do you stop audit events from containing too much personal data?

Record identifiers and data classes, not the data itself: the customer id and the fact that personal data was read, not the customer's name and address. The audit store then holds evidence of access without becoming another copy of the personal data it is meant to protect.

8Conclusion

In this answer, we found the real flaw behind the board's finding: security-relevant facts were left to debug logging. We separated audit events from operational logs, defined an audit catalogue with security and legal and tested each entry, delivered events through a guaranteed path into an append-only store with its own retention, kept operational logging lean because audit no longer depends on levels, and proved the design with quarterly reconstruction exercises and coverage reports to leadership.

What to say in the interviewAbout 90 seconds aloud

Open with

I'd start by naming the real problem: facts we must be able to prove were treated as debug output. Logs are built for engineers, so levels change, lines get sampled or dropped, and retention is short.

Then, if they want more

So instead of logging everything, I'd separate audit events from operational logs. Security-relevant actions, like access to personal data, permission changes, exports, deletions and admin actions, become audit events, written through a dedicated audit API in our platform library, not through a logger, so no level or filter can switch them off.

I'd define the catalogue of those events together with security and legal, with fields, owning systems, retention and an owner for each, and every entry gets an integration test that performs the action and checks that the event was recorded.

For delivery, events go through a durable path, an outbox in the same transaction or a replicated Kafka topic, into an append-only store with restricted, audited access and the retention legal sets. For the riskiest actions, like bulk exports, I'd rather fail the action than perform it without a record. Operational logging can then stay at INFO and WARN defaults.

Finally, I'd test it the way the board will: quarterly reconstruction exercises, like show every access to this customer's records in 90 days, and a coverage report per system to leadership as part of security posture.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A board-level incident review found the company could not reconstruct what happened...": https://scrivio-interview-library.netlify.app/java/java-logging/015ea1289c/