plexy v0.3.3 Plexy.Logger.SimpleRedactor

SimpleRedactor is able to filter and redact sensative data

Link to this section Summary

Functions

Assuming line is in the format "key=value"

Link to this section Functions

Link to this function

run(line, opts)

Assuming line is in the format "key=value"

  • redact the values for all "keys" under opts :redact
  • filter out the entire line if it has a "key" under opts :filter

Examples

iex> SimpleRedactor.run("username=bob age=21", redact: ["username"])
{:cont, "username=REDACTED age=21"}
iex> SimpleRedactor.run("password=mysecred", filter: ["password"])
{:cont, ""}