# `ApifyClient.Logs`
[🔗](https://github.com/social-growth-studio/apify-client-ex/blob/v1.0.0/lib/apify_client/logs.ex#L1)

Logs of Actor runs and builds.

    {:ok, log} = ApifyClient.Logs.get(run.id)

    # Follow a running Actor's log
    {:ok, stream} = ApifyClient.Logs.stream(run.id)
    Enum.each(stream, &IO.write/1)

Functions take the connection options described in `ApifyClient.Client`
(`:token`, `:config`, ...) next to their own.

# `get`

```elixir
@spec get(String.t(), keyword()) ::
  {:ok, String.t()} | {:error, ApifyClient.Error.t()}
```

Gets the log of a run or build as text.

## Options

  * `:raw` - keep the log verbatim (by default the API removes ANSI escape codes)

# `stream`

```elixir
@spec stream(String.t(), keyword()) ::
  {:ok, Enumerable.t()} | {:error, ApifyClient.Error.t()}
```

Streams the log of a run or build as binary chunks, for as long as it is
running.

The request is made right away, so a missing run comes back as an error. The
returned stream must be consumed by the calling process (the chunks arrive in
its mailbox).

## Options

  * `:raw` - keep the log verbatim (by default the API removes ANSI escape codes)

---

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