AgentWorkshop.EventLog (AgentWorkshop v0.3.0)

Copy Markdown View Source

Event history and live streaming for Workshop operations.

Subscribes to PubSub and stores events in a ring buffer. Optionally prints events live to the console as they happen.

Usage from IEx

watch()              # start printing live events
unwatch()            # stop printing
events()             # show last 20 events
events(last: 50)     # show more
clear_events()       # clear history

Summary

Functions

Returns a specification to start this module under a supervisor.

Clear event history.

Get recent events.

Stop printing live events.

Start printing live events to the console.

Is live watching enabled?

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear()

@spec clear() :: :ok

Clear event history.

recent(opts \\ [])

@spec recent(keyword()) :: [map()]

Get recent events.

unwatch()

@spec unwatch() :: :ok

Stop printing live events.

watch()

@spec watch() :: :ok

Start printing live events to the console.

watching?()

@spec watching?() :: boolean()

Is live watching enabled?