HIPAA Audit Logs: What to Record, Review and Keep
HIPAA Audit Logs: What to Record, Review and Keep

HIPAA requires you to record and examine activity in every system that contains or uses electronic protected health information (ePHI), and to review those records regularly. It does not hand you a field list, a review schedule or a log retention number. You decide those from your risk analysis, and you write the decisions down. This guide walks through what the rule says, what a defensible log contains, how to protect it and how to think about the six-year figure everyone quotes.
TL;DR
- The Security Rule requires audit controls (45 C.F.R. § 164.312(b)) and a procedure for reviewing system activity (§ 164.308(a)(1)(ii)(D)). Logging alone does not satisfy either one.
- HHS says the rule does not specify which information to collect or how often to review. Your risk analysis sets both.
- Protect logs from edits, deletion and broad access, or they lose their value as evidence.
- HIPAA sets no retention period for logs. Six years applies to required documentation, and many teams apply it to logs as a safe default.
- Build logging into your software from the start. Adding it after launch costs more and leaves gaps.
Table of Contents
- What HIPAA requires for audit logs
- Audit log vs. audit trail
- What your logs should capture
- Why the purpose matters: four jobs for one log
- How often to review audit logs
- Protecting the logs themselves
- How long to retain HIPAA audit logs
- What auditors and OCR look for
- A practical build checklist for software teams
- Perspective
- Getting logging right in your own systems
- FAQ
- Sources
What HIPAA requires for audit logs
Two provisions of the Security Rule do the work. The first is the technical safeguard called audit controls: hardware, software and/or procedural mechanisms that record and examine activity in information systems that contain or use ePHI. The second is the administrative safeguard called information system activity review. It requires procedures to regularly review records of system activity, and the regulation text names audit logs, access reports and security incident tracking reports as examples.
Read together, they ask for three things:
- Record. Your systems capture activity involving ePHI.
- Examine. A person or tool actually looks at that activity.
- Document. Your policies say what you record, who reviews it, how often and what happens when something looks wrong.
The Security Rule also expects you to periodically evaluate how well your safeguards work and to re-evaluate risks to ePHI. A log that nobody reads is the most common way organizations fail this expectation, because the data exists but the “examine” step never happens.
The rules apply to covered entities (providers, health plans, clearinghouses) and to business associates, including software vendors and cloud hosts that handle ePHI for them. If you build or buy a patient portal, scheduling tool or AI assistant that touches ePHI, its logging is part of your compliance picture. Our guide to business associate agreements covers how those obligations pass between organizations.
Audit log vs. audit trail
People use the two terms interchangeably, and HHS draws only a loose line. In its cybersecurity newsletter on audit controls, the Office for Civil Rights (OCR) describes audit logs as records of events based on applications, users and systems. Audit trails draw on those logs, and their main purpose is to maintain a record of system activity by application processes and users.
A practical way to hold the difference:
- Audit log: the raw, time-ordered entries. “User 4821 opened record 99172 at 14:03.”
- Audit trail: the story you assemble from those entries, such as everything one user did to one patient chart from login to logout.
You need the first to produce the second. When a patient asks who looked at their chart, or an investigator asks how a breach unfolded, you answer with the trail.
What your logs should capture
Here is where many teams get stuck. OCR states plainly that the Security Rule does not specify what information should be collected from an audit log or trail, or how often reports should be reviewed. Covered entities and business associates decide what is reasonable and appropriate based on their risk analysis and organizational factors.
That freedom comes with a duty to justify your choices. A sound baseline answers who, what, which record, when, where and whether it worked. One industry guide describes typical entries this way, and it matches how most security teams think about it.
The same guide groups the events investigators care about into categories. Use them as a checklist for your own risk-based decisions:
| Category | Examples worth logging |
|---|---|
| Authentication and access | Logins, logouts, failed logins, lockouts, privilege changes |
| ePHI activity | View, create, modify, delete, download, print, export, share, transmit, including denied attempts |
| Administrative changes | New accounts, role changes, configuration edits, policy changes |
| System and security events | Malware detections, intrusion alerts, software updates, service failures, attempts to clear or alter logs |
| Data exchange | Email, file sharing, SFTP and API traffic, with sender, recipient and outcome |
Two details deserve attention.
Failed attempts matter as much as successes. A run of denied requests against patient records is often the first visible sign of snooping or a compromised account.
Time must be trustworthy. The federal health IT certification specification for auditing says the log must record date and time, using synchronized clocks per the NTP standard. That certification criterion applies to certified health IT, but the logic holds for any system: if servers disagree about the time, you cannot reconstruct the order of events.
One more design point: log the fact of access, not the content. An audit entry that copies the diagnosis into the log creates a second store of ePHI that needs its own protection. Record the record ID, the user and the action instead.
Why the purpose matters: four jobs for one log
A university’s published HIPAA audit controls policy offers a useful way to frame it. Stanford’s policy says logging supports individual accountability, reconstruction of events, intrusion detection and problem identification. If you design for those four jobs, your field list tends to settle itself:
- Accountability needs unique user IDs. Shared logins make an audit trail useless because you cannot say which person acted.
- Reconstruction needs complete, ordered, time-synchronized entries.
- Intrusion detection needs security events and failed attempts, plus alerting that someone reads.
- Problem identification needs modification and deletion events, so you can spot wrongful changes to data.
An AHIMA practice brief adds that organizations should run security audits using audit trails and logs that give a back-end view of system use, recording key activities such as access, modifications and transactions. The brief dates from 2014, so treat it as professional guidance on practice, and treat the regulation as the requirement.
How often to review audit logs
HIPAA gives no interval. OCR’s newsletter says audit trails should be reviewed regularly, particularly after a security incident or breach and during real-time operations, and that regular review builds awareness of activity that suggests an incident.

AHIMA’s brief goes further on timing: review should happen as close to real time as possible and soon after an event. It offers an example minimum of monthly review of user activity in clinical applications. It also notes that periodic review helps detect unauthorized access, provides forensic evidence in investigations and shows whether policies and user education are working.
A review rhythm that most small and mid-sized organizations can sustain:
- Automated alerts, continuous. Rules for failed-login bursts, after-hours bulk exports, access to VIP or employee records and attempts to alter logs.
- Targeted review, weekly. A short pass over high-risk events from the alerts and dashboards.
- Sampled review, monthly. A look at user activity inside clinical or patient-data applications, documented with the date, reviewer and findings.
- Event-driven review, immediately. After any suspected incident, run a full trail for the users and records involved.
Write whichever schedule you pick into your policy and follow it. Documented review is what turns a pile of data into compliance evidence. Your cadence is a risk-based decision, so tie it to your risk analysis. For the broader security picture, this HIPAA Security Rule compliance guide shows how monitoring and incident investigation fit with the rest of the safeguards.
Protecting the logs themselves
An audit log is only worth anything if nobody can quietly edit it. OCR’s newsletter says access to audit trails should be strictly restricted and given only to authorized personnel. It also warns that unprotected logs can be tampered with, which makes recovery difficult.
The federal health IT auditing specification is concrete about technical design. Audit log actions related to electronic health information must not be capable of being changed, overwritten or deleted by the technology, and the technology must detect whether the log has been altered. Again, this is a certification criterion, but it is a good engineering target for any system.
Stanford’s policy shows the same idea in an operations setting: modification, deletion or falsification of log files is strictly prohibited, and access is limited to system owners, administrators and people responsible for activity review and incident handling.
Translated into build requirements:
- Append-only storage. Write logs to a store where entries can be added but not edited or removed.
- Separation of duties. The people who administer a system should not be the only ones who control its logs.
- Role-based access to logs. A small named group reads them. Everyone else gets nothing.
- Tamper evidence. Hashing or signing of entries, plus an alert when the log pipeline stops or someone tries to clear it.
- Off-system copies. Ship logs to a separate account or service so a compromise of the application does not erase its own tracks.
How long to retain HIPAA audit logs
The retention question trips up a lot of teams, so here is the precise answer. HIPAA does not state a retention period for audit logs. What it does require is that documentation of Security Rule policies, procedures, actions, activities and assessments be kept for six years from the date of creation or the date it was last in effect, whichever is later.
Whether a given log counts as that kind of documentation depends on how you use it. Records of your activity reviews clearly do. Raw logs that support those reviews and any investigation are covered by prudent practice. That is why most compliance programs apply six years to audit logs, and why we suggest you do the same unless counsel advises otherwise.
A few practical notes:
- Six years is a floor for required documentation, not a ceiling. State law, litigation holds and contracts can require longer, so check your state’s rules and your payer and customer agreements.
- Purging after the retention period is allowed. The federal health IT specification clarifies that certification does not prohibit an organization from deciding to delete or purge audit logs after a legal retention period. Define that period in your policy.
- Tier your storage. Keep recent logs searchable (hot), and move older ones to cheaper, locked-down archives that you can still retrieve for an investigation.
- Review comes first. Stanford’s policy keeps logs at least until an activity review is performed and documented, and lets the system owner decide on longer retention based on operational, risk or regulatory needs. A logging pipeline that deletes data before anyone reviewed it defeats the purpose.
Default cloud log settings often keep data for 30 to 90 days. Check yours, because that default alone can leave you years short of your own policy.
What auditors and OCR look for
HHS is required by the HITECH Act to audit covered entities and business associates for compliance with the Privacy, Security and Breach Notification Rules. OCR publishes its audit program details and protocol on that page, and you should check it for the current round and scope instead of relying on a secondhand summary.
When audit controls come up, the questions are predictable:
- Do you have a written policy for what is logged and reviewed?
- Can you show evidence that reviews happened, with dates and outcomes?
- Are logs protected from alteration and limited to authorized people?
- Does your risk analysis explain why you chose this scope and cadence?
- Can you produce an audit trail for a specific user or patient record on request?
If you can answer all five with documents and a live demo, you are in a strong position. Our audit-ready HIPAA compliance guide covers the wider set of essentials auditors expect.
A practical build checklist for software teams
If you are commissioning or building software that touches ePHI, treat logging as a requirement from the first sprint:
- Define events up front. List the actions in the table above that apply to your product and agree on a log schema (user ID, action, record ID, timestamp, source, result).
- Use unique identities. No shared accounts, including for service integrations and AI agents. Every automated actor gets its own identity so its actions are attributable.
- Centralize. Send application, database, cloud and identity logs into one place so a trail can span systems.
- Lock it down. Append-only storage, restricted roles, tamper alerts and an off-system copy.
- Automate alerts. Choose a short list of high-signal rules before launch.
- Write the review procedure. Owner, cadence, escalation path and a template for documenting each review.
- Set retention in policy and in code. Lifecycle rules should match what your policy says.
- Test the trail. Pick a random record and confirm you can show who touched it, when and what they did.
Integrations deserve special attention. Each connection between systems, such as an EHR feed, a scheduling tool or a messaging service, is another place ePHI moves, and each needs logging that ties into the same trail. If you are moving workloads to the cloud, our healthcare cloud migration guide explains how to carry controls like these across.
Perspective
Most logging failures we see are design failures, not tooling failures. The logs exist, but they were bolted on after the product shipped, so they miss the events an investigator needs, share identities across users and sit in a place the administrators can edit.
Our view is that audit logging belongs in discovery, before any code is written. When we scope a healthcare build, we want to know which systems touch ePHI, who the actors are (people, integrations and AI agents) and what questions you will need to answer after an incident. The log schema, review process and retention rules come out of those answers.
That is the reason we put so much weight on a thorough discovery phase. It is cheaper to decide that every action gets an attributable identity and a tamper-evident record on day one than to retrofit it across a live platform. Our engineers have big tech experience, and we apply that rigor to compliance-sensitive systems, including HIPAA-compliant software.
You can see how we approach this in our healthcare technology and compliance article and in the HIPAA-compliant patient portal case study.
Cameron
Getting logging right in your own systems
If you run a practice, a healthtech startup or an operations team that handles ePHI, we can help you scope logging, access controls and review workflows as part of a build or an integration. Our Discovery Audit is $999 one-off and is credited toward a build contract. It is where we map your systems, data flows and compliance needs before recommending anything. If you are deploying AI agents, managed agents start from $1,500 per month, and a one-time build you own starts from $2,500.

For larger platforms, our custom software cost guide lays out how scope drives price, and our AiRN healthcare software page shows what we build for providers.
FAQ
Does HIPAA require audit logs?
Yes, in effect. The Security Rule requires audit controls that record and examine activity in systems containing or using ePHI, and procedures to regularly review that activity. The rule does not use the words “audit log” in the control itself, but logs are the standard way to meet it. The review procedure is the part many organizations miss.
How long do you have to keep HIPAA audit logs?
HIPAA states no specific period for logs. Required Security Rule documentation must be kept six years, and many organizations apply that to their logs as a conservative default. State law or contracts may require longer, so confirm with your compliance officer or healthcare attorney.
What should a HIPAA audit log include?
HHS says the rule does not list required fields, so your risk analysis decides. A typical entry records who acted, what they did, which record, when, from where and whether it succeeded. Include failed and denied attempts and log-related security events.
How often should audit logs be reviewed?
HIPAA sets no interval. OCR says to review audit trails regularly, especially after incidents. AHIMA’s example is at least monthly for user activity in clinical applications, with review as close to real time as possible. Document each review.
Sources
- Summary of the HIPAA Security Rule, HHS.gov
- 45 CFR § 164.308, Administrative safeguards
- January 2017 Cybersecurity Newsletter, HHS OCR
- Auditing actions on health information, HealthIT.gov
- HIPAA Security: Audit Controls Policy, Stanford University IT
- Privacy and Security Audits of Electronic Health Information, AHIMA
- HIPAA Audit Log Requirements and Retention Guide, Kiteworks
- OCR’s HIPAA Audit Program, HHS.gov