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

An IO device that keeps only the end of what is written to it.

A worker sets it as the group leader of the process that starts its `:peer`: over a
`:standard_io` connection the peer relays all its output (tests, the app, Logger) as IO
requests to that group leader (`docs/dependencies/peer.md`), so none of it reaches the
controller's stdout, which carries only Juggernaut's formats. The last `limit` bytes
are kept for error messages (a failed boot shows what the peer printed). Reads answer
`:eof`; `getopts` reports a unicode binary device, as the `elixir` application asks.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear`

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

Forgets what was kept.

# `start_link`

```elixir
@spec start_link(pos_integer()) :: GenServer.on_start()
```

Starts a device linked to the caller, keeping the last `limit` bytes.

# `tail`

```elixir
@spec tail(pid()) :: String.t()
```

The kept end of the output.

---

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