Skip to main content

log

The scloud log command provides a way to retrieve logs for your live service.

Running the base command below fetches the most recent logs:

scloud log

To retrieve logs within specific time ranges, the --before and --after options can be used. Also, the --recent option can be named explicitly. See some examples below:

scloud log --before=2024-12-01T00:00:00Z --after=2024-11-01T00:00:00Z
scloud log --after=2024-11-01T00:00:00Z
scloud log --recent=5m

The recent time unit can also be passed as the first agrument:

scloud log 10m
scloud log 3h
scloud log 14d

To tail the logs (i.e. get streaming real-time updates), add the --tail flag:

scloud log --tail

Usage

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
`scloud project link --help`.
--limit=<integer> The maximum number of log records to fetch.
(defaults to "50")
-u, --[no-]utc Display timestamps in UTC timezone instead of local.
-r, --recent=<integer[us|ms|s|m|h|d]> Fetch records from the recent period length; s (seconds) by
default. Can also be specified as the first argument.
--before=<YYYY-MM-DDtHH:MM:SSz> Fetch records from before this timestamp.
--after=<YYYY-MM-DDtHH:MM:SSz> Fetch records from after this timestamp.
--tail Tail the log and get real time updates.

Run "scloud help" to see global options.

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