GSMLG.Logger.Redactors.RedactKeys (gsmlg_logger v0.1.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: {GSMLG.Logger.Formatters.Basic, redactors: [
    {GSMLG.Logger.Redactors.RedactKeys, ["password"]}
  ]}

Keep in mind that the key will be converted to binary before sending it to the redactor.

Summary

Functions

Link to this function

redact(key, value, keys)

Callback implementation for GSMLG.Logger.Redactor.redact/3.