PhoenixFlags.AuditLog (PhoenixFlags v0.9.0)

Copy Markdown View Source

Schema for flag change audit records.

Each row represents a single value change to a flag, recording who changed it, what the old and new values were, and when it happened.

Audit logging is opt-in — enable it with audit: true in your config module:

use PhoenixFlags,
  otp_app: :my_app,
  repo: MyApp.Repo,
  audit: true,
  actor_fn: &MyApp.Flags.current_user/1