View Source LoggerJSON.Redactors.RedactKeys (logger_json v6.0.0-rc.0)

A simple redactor which replace the value of the keys with "[REDACTED]".

It takes list of keys to redact as an argument, eg.:

config :logger, :default_handler,
  formatter: {LoggerJSON.Formatters.Basic, redactors: [
    {LoggerJSON.Redactors.RedactKeys, ["password"]}
  ]}

Keep in mind that LoggerJSON will convert key type to string before comparing it with the list of keys to redact.

Summary

Functions

Link to this function

redact(key, value, keys)

View Source

Callback implementation for LoggerJSON.Redactor.redact/3.