Developer releases configurable Node.js logger that masks PII before data is written to logs
Software developer Sven Bajonczak has published an open-source Node.js module called PiiSanitizer, designed to automatically redact personally identifiable information before it reaches application log outputs. The tool intercepts log data at the boundary and masks common PII such as email addresses, phone numbers, credit card numbers, and IBAN-like values, while redacting sensitive object keys like passwords and tokens. A key design goal is configurability — teams can define custom regex and key-based rules to catch domain-specific identifiers, such as SAP personnel numbers, without modifying the core logger code. The module processes nested objects and arrays without mutating the original input, and supports both structured object records and JSON line formats. The project is available on GitHub and carries no runtime dependencies, making it lightweight to integrate into existing Node.js applications.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in