# `Juggernaut.Pool.PeerReports`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/pool/peer_reports.ex#L1)

A primary `:logger` filter in the controller that drops the termination reports of
`:peer` control processes.

A worker's peer runs with `peer_down: :crash` (`docs/dependencies/peer.md`), so a peer
that dies, or one whose worker is killed while the pool stops (a worker busy booting
again does not answer its shutdown in time), logs a GenServer termination report with
the whole `:peer` state: its command line, its environment, its port. The worker
already records why its peer went (a recycle with its reason, a job's `:down` status,
a boot error), so the report only buries a run's own error under a page of state.

`install/0` adds the filter once (adding it again is a no-op). Every other log event
passes untouched.

# `filter`

```elixir
@spec filter(:logger.log_event(), term()) :: :logger.filter_return()
```

The filter: `:stop` for the termination report of a process whose state is a `:peer`
control process's, `:ignore` (pass on) for anything else.

# `install`

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

Adds the filter to the controller's primary `:logger` config, once.

---

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