A transaction log scrolls across your terminal. Credit card numbers. Email addresses. API keys. All visible. All dangerous.
Lnav can mask sensitive data before it ever reaches your eyes. No extra scripts. No external filters. Just direct, in-terminal protection. This makes it possible to review logs for errors without risking exposure of secrets. It is fast, configurable, and built to handle real workloads.
Why mask sensitive data in Lnav?
Logs often contain Personally Identifiable Information (PII), payment details, authentication tokens, or customer records. Once logged, that data can spread—through backups, tooling, or personnel. Masking ensures that sensitive fields are sanitized during analysis, removing the risk of accidental leaks.
How Lnav masking works
Lnav’s highlight and filter features can be configured with regular expressions to find patterns such as credit card numbers or email addresses. Then, highlight regex:<pattern> style:masked can be used to replace matching values with placeholder text. Masking rules are persistent and can be loaded via configuration files, so they apply automatically across sessions.