Organizations must implement log management to comply with HIPAA, SOC2, and GDPR. The risk of non-compliance is vast: fines, lost revenue, reduced trust, and more.
At MEV, we have years of experience in infrastructure compliance mediation. During that time, we observed that not many organizations had a clear understanding of log management for HIPAA, SOC 2, and GDPR compliance.
We’ve compiled the following frequently asked questions and best practices to improve your organization’s log management approach.
General Compliance Requirements for Log Management
While HIPAA, SOC 2, and GDPR all have specific compliance requirements, there are some general log management requirements your organization should keep in mind.
Audit Trails
Comprehensive audit trails are critical for tracing any action taken on log data, providing an immutable record of who did what and when. This capability is crucial not only for investigating security incidents but also for demonstrating compliance with regulatory audits. Effective audit trails should capture details such as login attempts, access changes, and data modification or deletion actions, ensuring complete visibility over log data handling.
Audit trails are logs of every action a user or system takes for each component. Applications can generate these logs for forwarding and storing external log collection systems such as Splunk, ELK, DataDog Logs, etc. For cloud providers, these audit trails are already part of their ecosystem, such as CloudTrail for AWS.

Retention and Disposal
Log data retention policies should reflect the operational need for log information and compliance with legal and regulatory requirements. Defining clear retention periods for different types of log data and implementing automated mechanisms for the secure deletion of logs after their retention period expires are best practices.
Secure disposal methods ensure that data cannot be reconstructed or retrieved using techniques such as cryptographic wiping or physical destruction of hardware. Disposal methods will vary depending on your storage type. For example, EBS volumes on AWS, NAS, or hard drives on bare metal require their own procedures.
NIST SP 800-88 and DoD 5220.22-M offer guidelines for securely erasing data from storage devices. Traditional DoD 5220.22-M methods, which include 3-pass and 7-pass overwrite techniques, are challenging to apply to SSDs due to their unique architecture. NIST SP 800-88 provides more appropriate methods for SSDs, such as ATA Secure Erase, Cryptographic Erase, and Media Destruction, ensuring data is irrecoverable. These methods are essential for securely sanitizing storage devices. Most Cloud Providers, such as AWS, already provide a built-in mechanism for wiping data for EBS volumes.
Cryptographic erase is the most universal method of data disposal for all types of media.
Processing and Storage
Compliance requirements ensure the secure handling and preservation of log data in accordance with legal and regulatory standards. This involves safeguarding sensitive information within logs, maintaining their integrity, and guaranteeing their availability for audits and investigations.
Data transportation is also crucial since it requires an isolated or secured transport protocol, such as utilizing separate VPCs and SSL. Proper processing and secure storage are foundational to meeting the stringent data protection requirements of regulations like HIPAA, SOC 2, and GDPR, ultimately supporting an organization's accountability, regulatory adherence, and operational efficiency.
Specific Requirements by Regulation
If your organization is subject to HIPAA, SOC 2, or GDPR, you must understand the specific log management requirements for those regulations.
While we’ve outlined the basics below, keep in mind that requirements might vary depending on your unique business environment and type of work. For example, if you handle payment data, ePHI, or other types of protected information, you will need to follow the appropriate protocols.
What are HIPAA & SOC 2 Log Management Requirements?
The Health Insurance Portability and Accountability Act (HIPAA) and SOC 2 have a lot of overlap when it comes to log management requirements.
To comply with both, your organization must log:
- Activities performed on the system.
- The user or entity (e.g., system account) that performed the activity, including the system from which it was performed.
- Granting, modification, or revocation of access rights, including adding a new user or group; changing user privileges, file permissions, database object permissions, firewall rules, and passwords.
- The file, application, or other object that the activity was performed on.
- The time that the activity occurred.
- The tool that the activity was performed with.
- The outcome (e.g., success or failure) of the activity.
- Detection of suspicious or malicious activity from a security system such as an Intrusion Detection or Prevention System (IDS/IPS), anti-virus system, or anti-spyware system.

HIPAA goes beyond the information system to deal with electronic protected health information (ePHI). Organizations subject to HIPAA must be diligent with their log management.
What are GDPR Log Management Requirements?
While the General Data Protection Regulation (GDPR) is less stringent than HIPAA and SOC 2 in that it doesn’t have regulations around what data must be logged, there are other factors to consider. To comply with GDPR requirements, you must focus on how you handle logged data. This includes:
- Documenting how you process log data within your Privacy Policy.
- Ensuring legitimate interest for logged data and only collecting required data.
- Only use log data for the intended purpose.
- Erase stored log data after the necessary time has passed.
- Maintain secure systems for data, including encrypting necessary data and reporting breaches to the appropriate authorities.

Effective Log Management: What to Log and What Not to Log
When it comes to log management, especially in the context of compliance with regulations such as HIPAA, SOC 2, and GDPR, it's crucial to have a clear understanding of what data should and should not be logged.
This balance is essential not only for security and operational efficiency but also to ensure privacy and compliance. Here are some guidelines for what to log:
What to Log
- Access Logs
Track who accessed the system, when they accessed it, and what they accessed. This includes both successful and failed login attempts, which are key for security audits and detecting unauthorized access or potential brute-force attacks. - System and Application Changes
Log any changes to the system or applications, such as software updates, configuration changes, or data modifications. These logs help trace changes that might impact system performance or security. - Security Events
Record any security-related events, including alerts from security systems, detected malware, or data breaches. These logs are crucial for incident response and forensic analysis. - Transactions and Business Operations
For systems handling transactions or critical business processes, log activities related to these operations. These logs are vital for auditing, performance monitoring, and troubleshooting. - Error Logs
Capture errors encountered by systems and applications. These logs are essential for diagnosing issues, improving system stability, and enhancing the user experience.
What Not to Log
- Sensitive Personal Information
Avoid logging sensitive personal data unless absolutely necessary. If you must log details like Social Security numbers, credit card information, or health data (PHI under HIPAA), ensure it’s done legally and securely, using encryption or other safeguards. - Passwords and Authentication Tokens
Never log plain-text passwords, authentication tokens, or other credentials. If logging this data is necessary for debugging, make sure it’s anonymized or encrypted and only accessible to authorized personnel. - Verbose Logging Without Purpose
Avoid logging excessive information that doesn’t serve operational, security, or compliance purposes. Over-logging can cause storage issues, complicate log analysis, and increase the risk of exposing sensitive data. - Redundant Logs
Don’t duplicate log entries, as this wastes storage and makes log analysis harder. Ensure that your log collection is set up to avoid redundancy.

Best Practices for Compliant Log Collection
Keep the following best practices in mind when creating your log management processes.
Implement Access Controls
Ensure that logs, particularly those containing sensitive or personal data, are accessible only to authorized personnel. Utilize role-based access controls (RBAC) to limit and monitor access to create an audit trail.
Secure Storage, Transmission, and Collection
Encrypt at rest and in transit log data to safeguard against unauthorized access or interception. Employ protocols like transport layer security (TLS) for encryption during transmission. Additionally, ensure secure collection methods, using encrypted channels to transmit data from the source to the log management system, preventing unauthorized interception and modification.
Ensure Log Data Integrity
Consolidate logs within a secure, managed logging environment to prevent tampering on local systems. Utilize a centralized log management system to aggregate logs from diverse sources, creating a unified and secure repository. This centralized approach simplifies monitoring, enhances analysis and correlation across various sources, and safeguards log integrity.
Regular Audit and Monitoring
Conduct audits of log management practices and systems periodically to ensure compliance with policies and regulatory requirements. Additionally, monitor logs for signs of unauthorized access or tampering. Automated tools can assist in detecting anomalies that may indicate integrity issues.
Automated Retention Policies
Implement automated retention policies that comply with regulatory requirements for data retention. This includes automatically purging old log data no longer required for compliance or operational purposes.
Secure Deletion
Ensure that log data is deleted securely as part of retention policies to prevent recovery. This is particularly important for logs containing sensitive information.
Document Practices and Policies
Document all log management practices and policies, including those related to secure processing. This documentation should be readily available for compliance audits and internal review.
Continuous Improvement
Review and update log management practices and policies regularly to address new threats, technological advancements, and changes in regulatory requirements.

Ensure Compliance
If your organization is subject to compliance with HIPAA, SOC 2, or GDPR, log management is just one factor you need to consider. At MEV, our team provides software development and ongoing support or maintenance services. With years of experience ensuring compliance, we can help your organization build and execute processes to comply with industry regulations.