Why should you not log secrets or PII, and how do you enforce it?
IntermediateConceptLogging: ELK/EFK, Loki & Log Shippers
Answer
Logs are copied to many systems with broad access and long retention, so a leaked token or card number in a log is a breach (and a GDPR/DPDP or PCI DSS violation).
Enforcement layers: logging library redaction (field allowlists, masking), linting in code review, and pipeline scrubbing (Fluent Bit modify/Lua filters, OTel Collector redaction or transform processor, Vector VRL redact). Defense in depth matters because one layer always misses something.
More on Logging: ELK/EFK, Loki & Log Shippers
What is the ELK stack, and what is EFK?BeginnerHow does Elasticsearch store and search logs?IntermediateWhat is ILM (Index Lifecycle Management) and why do log clusters need it?IntermediateWhat is an Elasticsearch data stream?AdvancedWhat is an index template and mapping, and what is a mapping explosion?AdvancedWhat does Logstash do compared with Beats?Intermediate