Skip to main content

logs

view logs for a service or deployment

📜 View logs for a service or deployment — straight from the top level.

csph logs [target] resolves a target to a deployment and then shows its logs, so you rarely need a deployment id. The target can be: • a deployment id — used directly • a service name — resolved to that service's latest deployment • nothing — resolved from a single-service computesphere.yaml in the current directory, or your configured default service

Three kinds, via --kind: • runtime — your application's stdout/stderr (the default) • build — the build output for a deploy version • deploy — rollout events (provisioning, scaling, image pull, live, …)

By default it prints the most recent lines and exits. Use --follow (-f) to stream live — runtime logs only. --tail sets how many recent lines to fetch, --since limits by age (e.g. 1h, 30m), and --timestamps prefixes each line.

--search (-q) filters to lines matching a free-text term (case-insensitive). For fetched logs the search runs server-side; with --follow it filters the live tail.

Service-name resolution is scoped to your active project and environment; use --project / --environment to override.

Logs are sanitized at the server, so they never expose internal infrastructure detail.

Usage​

csph logs [target] [flags]

Options​

Command Specific​

--account <string>
account ID
--deploy-version <string>
deploy version id for --kind build (default: latest)
--environment <string>
environment ID

-f, --follow

stream logs live (runtime only)

--kind <string> (default "runtime")

log kind: [runtime|build|deploy]
--output <string>
output format: [json]
--project <string>
project ID

-q, --search <string>

only show lines matching this free-text filter (case-insensitive)
--since <duration>
only logs newer than a duration, e.g. 1h or 30m

-n, --tail <int> (default 200)

number of recent lines to fetch
--timestamps
prefix each line with its timestamp

Inherited​

--config <string>
config file (default is $HOME/.config/computesphere/configuration.yaml)
--debug
enable debug logging

-h, --help

show this help message

-i, --interactive

run interactively (prompts, pickers, table browser)
--log-level <string>
log level: [trace|debug|info|warn|error|fatal|panic|disabled||api]
--no-color
disable color output
--no-input
disable interactive mode

Examples​

# logs for a service by name (latest deployment, runtime)
> csph logs web

# logs from the project directory (single-service computesphere.yaml)
> csph logs

# stream a service's runtime logs live (Ctrl-C to stop)
> csph logs web --follow

# a deployment id still works directly
> csph logs <deployment-id>

# last hour, with timestamps
> csph logs web --since 1h --timestamps

# search the logs (server-side, case-insensitive)
> csph logs web --search "timeout"

# rollout / deploy events, or the build output
> csph logs web --kind deploy
> csph logs web --kind build

See also​