AshEventLog.Resource

Copy Markdown View Source

Extension for resources that should log events.

use Ash.Resource,
  extensions: [AshEventLog.Resource]

event_log do
  event_log MyApp.Events.Event
  ignore_actions [:background_recalculate]
end

Use only_actions to opt in to a specific allowlist instead:

event_log do
  event_log MyApp.Events.Event
  only_actions [:create, :update]
end

ignore_actions and only_actions are mutually exclusive.

event_log

Options

NameTypeDefaultDocs
event_logatomThe event log resource module.
ignore_actionslist(atom)[]Actions to exclude from event logging. Mutually exclusive with only_actions.
only_actionslist(atom)If set, only these actions will be logged. Mutually exclusive with ignore_actions.