Logs
Access build and runtime logs for every service. Stream logs in real-time, filter by severity, search for specific patterns, and download logs for offline analysis.
Build Logs vs. Runtime Logs
sh0 captures two distinct types of logs for each service. Understanding the difference helps you find the information you need quickly.
Build Logs
Build logs capture everything that happens during the image build process. This includes Dockerfile layer execution, dependency installation, compilation output, and build errors.
Build logs are accessible from the Deployments tab. Each deployment has its own build log.
Common things to look for in build logs:
- Dependency errors -- Failed
npm install,pip install, or package resolution issues. - Compilation errors -- TypeScript, Rust, Go, or other compile-time failures.
- Cache hits -- Layers marked as "CACHED" that speed up the build.
- Image size -- The final image size is shown at the end of the build.
Step 1/8 : FROM node:20-alpine
---> 2d8f48ba52c1
Step 2/8 : WORKDIR /app
---> Using cache
---> 8a3d2e1f5b7c
Step 3/8 : COPY package*.json ./
---> Using cache
---> 4f2a1b3c8d9e
Step 4/8 : RUN npm ci --production
---> Running in 7e6d5c4b3a2f
added 847 packages in 12.3s
Step 5/8 : COPY . .
---> 1a2b3c4d5e6f
Step 6/8 : RUN npm run build
---> Running in 9f8e7d6c5b4a
Build completed successfully
Step 7/8 : EXPOSE 3000
Step 8/8 : CMD ["node", "dist/server.js"]
Successfully built a1b2c3d4e5f6Runtime Logs
Runtime logs capture the output of your running application -- everything your process writes to stdout and stderr. This includes HTTP request logs, application errors, debug messages, and any other output.
Access runtime logs from the Logs tab on the service detail page.
Real-Time Log Streaming
The log viewer streams logs in real-time using WebSocket connections. New log entries appear instantly at the bottom of the viewer as they are produced by your application.
- Auto-scroll -- The viewer auto-scrolls to show the latest entries. Scroll up to pause auto-scrolling and inspect older entries.
- Pause / Resume -- Click the Pause button to stop the stream temporarily. Logs are buffered and appear when you resume.
- Timestamp format -- Each line is prefixed with a timestamp. Click the timestamp format toggle to switch between relative ("2s ago") and absolute ("2026-03-21 14:30:05") formats.
Filtering Logs
Filter logs to focus on what matters. sh0 provides several filtering options:
- Time range -- View logs from the last 15 minutes, 1 hour, 6 hours, 24 hours, or a custom date range.
- Container -- When a service has multiple replicas, filter to a specific container instance.
- Stream -- Show only stdout, only stderr, or both.
- Severity -- If your application uses structured logging, filter by severity level (debug, info, warn, error).
Searching Logs
Use the search bar to find specific entries in the log stream. Search supports plain text matching and basic regular expressions.
- Click the search icon or press Ctrl + F (or Cmd + F on macOS).
- Type your search query.
- Matching entries are highlighted in the log viewer.
- Use the up/down arrows in the search bar to jump between matches.
# Find all error messages
ERROR
# Find a specific user ID
user_id=12345
# Find requests to a specific endpoint
POST /api/users
# Find slow requests (regex)
took [0-9]{4,}msDownloading Logs
Download logs for offline analysis, archival, or sharing with your team. Click the Download button in the log viewer to export the currently visible logs.
- Plain text (.log) -- Raw log output with timestamps, ready for
grep,awk, or any text processing tool. - JSON (.json) -- Structured format with timestamp, container ID, stream (stdout/stderr), and message fields.
{
"timestamp": "2026-03-21T14:30:05.123Z",
"container": "my-api-1",
"stream": "stdout",
"message": "GET /health 200 2ms"
}Log Retention
sh0 retains logs based on your configuration. Default retention settings balance storage usage with debugging needs:
| Log Type | Default Retention | Configurable |
|---|---|---|
| Build logs | Last 20 builds | Yes |
| Runtime logs | 7 days | Yes (1-90 days) |
| Cron job logs | Last 100 executions | Yes |
To adjust retention settings, navigate to Settings → Logs and update the retention values. Reducing retention saves disk space on the server.