Why this matters
Logs are high-volume replicas; leakage risk is high.
Logging/metrics must redact or hash personal data; attach lawful_basis and purpose to diagnostic context; forbid raw PII in logs. (GDPR Art. 5(1)(c) data minimization)
Logs are high-volume replicas; leakage risk is high.
Side-by-side examples engineers can pattern-match during review.
{"level":"info","msg":"login","email":"alice@example.com"}{"level":"info","msg":"login","email_hash":"sha256:...","gdpr":{"purpose":"auth","lawful_basis":"contract"}}logger.info({ email_hash, gdpr:{purpose:'auth', lawful_basis:'contract'} });logger.info({ email }); // raw PIIFrom the same buckets as this rule.