AuditTrail. Config
(audit_trail v0.1.2)
Copy Markdown
Summary
Functions
Path to the DETS file when dead_letter_persistent?/0 is true. Defaults to a file in the current working directory — override for anything beyond local dev.
When true, AuditTrail.DeadLetter persists its queue to disk (via
:dets) instead of plain in-memory ETS, so entries queued when Loki is
down survive a node restart/deploy instead of being lost. Off by default
— DETS is disk-backed and slower than ETS, so this is opt-in rather than
changing default behavior for existing users
Field names whose values get redacted before a log payload ships,
regardless of which entry point produced it (ControllerAudit, emit/2,
monitor/4's original_record:/params: diffing, schema-level Diff).
Matched case-insensitively against both atom and string map keys.
Returns the configured storage adapter.
Functions
Path to the DETS file when dead_letter_persistent?/0 is true. Defaults to a file in the current working directory — override for anything beyond local dev.
When true, AuditTrail.DeadLetter persists its queue to disk (via
:dets) instead of plain in-memory ETS, so entries queued when Loki is
down survive a node restart/deploy instead of being lost. Off by default
— DETS is disk-backed and slower than ETS, so this is opt-in rather than
changing default behavior for existing users:
config :audit_trail,
dead_letter_persistent: true,
dead_letter_path: "/var/lib/my_app/audit_trail_dead_letter.dets"The directory in dead_letter_path: must already exist and be writable —
this is not created automatically.
Field names whose values get redacted before a log payload ships,
regardless of which entry point produced it (ControllerAudit, emit/2,
monitor/4's original_record:/params: diffing, schema-level Diff).
Matched case-insensitively against both atom and string map keys.
Override entirely (this replaces the defaults, it doesn't add to them — include what you still want redacted):
config :audit_trail, sensitive_fields: ~w(password token my_app_secret)
Returns the configured storage adapter.
Can be:
- An atom:
AuditTrail.Adapters.Loki - A tuple:
{AuditTrail.Adapters.Postgres, repo: MyApp.Repo}
Defaults to AuditTrail.Adapters.Loki.