The Basics of GDPR
The crux of the GDPR is personal data, which is defined under Article 4 as “any information relating to an identified or identifiable natural person.” This includes names, addresses, physiological data, and even online identifiers like IP addresses. Anyone who can be identified through this information is considered a data subject. Essentially, the GDPR protects data subjects by restricting the use of their personal data. Some of the rights that the GDPR gives to data subjects include:- Requiring consent before their data can be collected, processed, or shared (Article 7)
- Learning how their personal data is being collected, processed, shared, and safeguarded (Article 15)
- Recourse in correcting inaccurate data records (Article 16)
- Requesting permanent deletion of their data, also called the “right to erasure” or the “right to be forgotten” (Article 17)
- Restricting how their data is processed (Article 18)
- Requesting electronic copies of their data (Article 20)
- Objecting to certain types of data processing, including automated processing (Article 21)
Data Controllers and Data Processors
The GDPR makes a distinction between data controllers and data processors. A data controller determines how and why personal data is collected and processed. A data processor processes personal data on behalf of a data controller. The relationship between a processor and a controller must be outlined in a legal document explaining how the data is to be managed. Note that even though controllers and processors have different obligations under the GDPR, a controller can still be held liable for breaches caused by their processors. In addition, Section 4 requires controllers and processors to designate a Data Protection Officer (DPO) to oversee the organization’s GDPR compliance.What GDPR Means for Logging
Logs contain a wealth of information about application performance, system operations, user activity, and errors. However, this data creates a substantial risk of personal data making its way into logs, whether deliberately or accidentally. Consider a web server access log. A single entry may contain a user’s IP address, the requested URL, their browser’s user agent, and even their username if they’re logged into your application. If the user causes the application to throw an exception, additional personal data could be logged in a stack trace or variable dump. All of this qualifies as personal data and is enforceable under the GDPR. Under Article 6, this data can be used lawfully in certain scenarios, including when:- The data subject gives their explicit consent
- It’s necessary to fulfill a contract or agreement with the data subject
- You are complying with other legal obligations
- You are protecting the interests of the data subject
Best Practices for Becoming Compliant
The following are general recommendations for mitigating your risk under the GDPR. These are only recommendations and don’t constitute legal advice. Always consult with your DPO before making any changes to your logging strategy.Shrink and Reduce Your Logs
The easiest way to reduce your risk is to avoid logging personal data in the first place. When reviewing your current logging practices, consider:- What personal data is contained within your logs
- Where your logs are being stored, and for how long

