sanitize static method
Scrubs well-known secret shapes (JWTs, bearer tokens, password=...,
card numbers) out of a free-form log message.
Implementation
static String sanitize(String message) {
var out = message;
for (final pattern in _sensitivePatterns) {
out = out.replaceAll(pattern, redactedPlaceholder);
}
return out;
}