Obscura.Logger (obscura v0.1.0)

Copy Markdown View Source

Logger-safe helpers for redacting terms before applications log them.

Summary

Functions

Redacts Logger metadata while preserving keyword-list or map shape.

Redacts any term using structured redaction.

Safely inspects a redacted term.

Functions

redact_metadata(metadata, opts \\ [])

@spec redact_metadata(
  keyword() | map(),
  keyword()
) :: {:ok, keyword() | map()} | {:error, term()}

Redacts Logger metadata while preserving keyword-list or map shape.

redact_term(term, opts \\ [])

@spec redact_term(
  term(),
  keyword()
) :: {:ok, term()} | {:error, term()}

Redacts any term using structured redaction.

safe_inspect(term, opts \\ [])

@spec safe_inspect(
  term(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Safely inspects a redacted term.