# `AgentWorkshop.EventLog`
[🔗](https://github.com/joshrotenberg/agent_workshop/blob/main/lib/agent_workshop/event_log.ex#L1)

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

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear`

```elixir
@spec clear() :: :ok
```

Clear event history.

# `recent`

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

Get recent events.

# `unwatch`

```elixir
@spec unwatch() :: :ok
```

Stop printing live events.

# `watch`

```elixir
@spec watch() :: :ok
```

Start printing live events to the console.

# `watching?`

```elixir
@spec watching?() :: boolean()
```

Is live watching enabled?

---

*Consult [api-reference.md](api-reference.md) for complete listing*
