# `Twilio.Serverless.V1.Service.Environment.LogService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/serverless/v1/service/environment/log_service.ex#L2)

A record of an event that occurred related to a function invocation.

Operations: `list`, `fetch`

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Serverless.V1.Service.Environment.Log.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Retrieve a specific log.

Operation: `FetchLog` | Tags: ServerlessV1Log

# `list`

```elixir
@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Retrieve a list of all logs.

Operation: `ListLog` | Tags: ServerlessV1Log

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `FunctionSid` | string | The SID of the function whose invocation produced the Log resources to read. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `StartDate` | string (date-time) | The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EndDate` | string (date-time) | The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()
```

Stream: Retrieve a list of all logs. (lazy auto-pagination).

---

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