Log Redaction
noun
say it: “LAWG rih-DAK-shun” /lɔɡ rɪˈdækʃən/
Replacing secrets such as passwords or tokens with a placeholder before a log line is written.
What is log redaction?
Log redaction hides a secret, such as a password or a token, in a log line by writing a placeholder such as [Redacted] in its place, so the logs never leak it.
const logger = pino({ redact: ["req.headers.authorization"] });
// the log line shows "authorization": "[Redacted]"
In a sentence
- “Add log redaction for passwords before the first log line goes to a log service.”
- “Thanks to log redaction, the request logs show "[Redacted]" where each sign-in token was.”
Level: Journeyman · More Software Development terms at this level
Updated