"Who Changed This Record?" You Should Have the Answer
A customer emails: "Your integration deleted employees from our HR system." Maybe it did. Maybe someone on their team did. Without a record of what your integration actually did, nobody can tell. Request logs help you debug. Audit logs answer who did what, to which record, when, and did it work.
What to log, and what never to log
The OWASP Logging Cheat Sheet, a free security guide, puts it in four words: when, where, who and what. For every call, log which account, which action, when, and whether it worked. Mask tokens, API keys and passwords. Keep sensitive personal data out, and log a record ID instead of a person’s details where you can.
{
"time": "2026-10-20T04:00:12Z",
"request_id": "req_7f3a",
"tenant": "acme",
"account": "acme-hr",
"actor": "user:u_381",
"action": "update_employee",
"record": "emp_1042",
"result": "success",
"status": 200,
"auth": "Bearer ****"
}Decide how long to keep them
Keeping logs forever feels safe. It is not, because old data can leak. OWASP says logs must not be deleted before the required retention period, and must not be kept beyond it. Set that period, and delete old logs on a schedule.
Make them searchable
Support should filter by customer and time, and find the answer in minutes, not days. Businesses, especially in HR and finance, often ask about logging before they sign.