AshEventLog.Resource (ash_event_log v0.1.3)

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.

Summary

Functions

event_log(body)

(macro)