Packages

Ecto auditing library that transparently tracks changes and can revert them

Retired package: Release invalid - Found a bug when compiling the repo

Current section

Files

Jump to
ex_audit lib ex_audit.ex
Raw

lib/ex_audit.ex

defmodule ExAudit do
use Application
def start(_, _) do
import Supervisor.Spec
children = [
worker(ExAudit.CustomData, [])
]
opts = [strategy: :one_for_one, name: ExAudit.Supervisor]
Supervisor.start_link(children, opts)
end
@doc """
Tracks the given keyword list of data for the current process
"""
def track(data) do
track_pid(self(), data)
end
@doc """
Tracks the given keyword list of data for the given process
"""
def track_pid(pid, data) do
ExAudit.CustomData.track(pid, data)
end
end