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​
Inherited​
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​
- csph — ComputeSphere CLI
- csph auth — sign in, sign out, and manage API tokens
- csph apply — apply a computesphere.yaml manifest
- csph deploy — deploy an app in one shot
- csph context — show your active account, project, and environment
- csph import — import external config into a computesphere.yaml manifest
- csph accounts — manage accounts
- csph projects — manage projects
- csph environments — manage environments
- csph services — manage services
- csph deployments — manage deployments
- csph alerts — manage alerts
- csph db — manage SphereDB databases
- csph cache — manage SphereCache caches
- csph queue — manage SphereQueue queues
- csph teams — manage teams
- csph activities — view activities
- csph profile — manage your profile
- csph configuration — Configuration via environment variables
- csph formatting — Output formatting
- csph exit-codes — Exit codes used by ComputeSphere
- csph completion — Generate the autocompletion script for the specified shell