# scloud log

https://docs.serverpod.dev/cloud/reference/cli/commands/log

`scloud log` fetches the runtime logs from your deployed service. Use it to read recent activity, filter by time range (`--since` / `--until`), or stream new records as they arrive (`--tail`).

See [Logs](https://docs.serverpod.dev/cloud/concepts/logs.md) for the time-format options (duration strings, ISO 8601), how `--tail` interacts with `--since` / `--until`, and session-log configuration.

## Usage

```console
Fetch Serverpod Cloud logs.

Usage: scloud log [arguments]
-h, --help                                                       Print this usage information.
-p, --project (mandatory)                                        The ID of the project.
                                                                 Can be omitted for existing
                                                                 projects that are linked (see the
                                                                 "project link" command) or if a
                                                                 global project context is set (see
                                                                 the "settings set projectContext"
                                                                 command).
    --limit=<integer>                                            The maximum number of log records
                                                                 to fetch.
                                                                 (defaults to "50")
-u, --[no-]utc                                                   Display timestamps in UTC timezone
                                                                 instead of local. Set
                                                                 SERVERPOD_CLOUD_DISPLAY_UTC=true to
                                                                 make UTC the default for all
                                                                 commands.
    --until=<YYYY-MM-DDtHH:MM:SSz or duration[us|ms|s|m|h|d]>    Fetch records from before this
                                                                 timestamp. Accepts ISO date (e.g.
                                                                 "2024-01-15T10:30:00Z") or relative
                                                                 from now (e.g. "5m", "3h", "1d").
    --since=<YYYY-MM-DDtHH:MM:SSz or duration[us|ms|s|m|h|d]>    Fetch records from after this
                                                                 timestamp. Accepts ISO date (e.g.
                                                                 "2024-01-15T10:30:00Z") or relative
                                                                 from now (e.g. "5m", "3h", "1d").
                                                                 Can also be specified as the first
                                                                 argument.
    --tail                                                       Tail the log and get real time
                                                                 updates. Cannot be combined with
                                                                 --since or --until.
    --raw                                                        Print the log content exactly as
                                                                 stored, without parsing.

Run "scloud help" to see global options.


Examples

  View the most recent logs (default limit is 50 records).

    $ scloud log


  View the most recent logs with UTC timestamps and a custom limit.

    $ scloud log --utc --limit 100


  Stream logs in real-time.

    $ scloud log --tail

  Streaming logs in real-time with --format json emits JSONL.

    $ scloud log --tail --format json


  View logs from the last hour using duration.

    $ scloud log 1h

    $ scloud log --since 1h


  View logs since a specific time using ISO date format:

    $ scloud log --since 2025-01-15T14:00:00Z

    $ scloud log --since "2025-01-15 14:00"

    $ scloud log --since 2025-01-15


  View logs in a time range using durations:

    $ scloud log --since 1h --until 5m


  View logs in a time range using ISO dates:

    $ scloud log --since 2025-01-15 --until 2025-01-16


  Mix ISO dates and durations:

    $ scloud log --since 2025-01-15T14:00:00Z --until 30m


See the full documentation at: https://docs.serverpod.dev/cloud/reference/cli/commands/log

```
