Logs & Debugging

Access real-time application logs, build logs, and deployment logs to debug issues quickly. Search, filter, and stream logs directly from the dashboard or via API.


Types of Logs

Temps provides several types of logs to help you understand what's happening with your application:

Application Logs - Runtime logs from your running containers - Standard output (stdout) and error output (stderr) - Real-time streaming available - Searchable and filterable Build Logs - Output from build processes - Docker build logs - Dependency installation logs - Build errors and warnings

Deployment Logs - Deployment workflow execution - Step-by-step deployment progress - Configuration and setup logs - Success/failure messages Audit Logs - System events and user actions - Security-relevant operations - Configuration changes - Access attempts


Accessing Logs

Via Dashboard

Application Logs:

  1. Navigate to Projects → Select your project
  2. Choose an Environment
  3. Click on a Container
  4. Open the Logs tab
  5. View real-time logs or search historical logs

Build Logs:

  1. Go to Projects → Select your project
  2. Open Deployments
  3. Click on a deployment
  4. View build logs in the deployment details

Deployment Logs:

  1. Navigate to Deployments
  2. Select a deployment
  3. View step-by-step deployment logs
  4. See which steps succeeded or failed

Via CLI

# View application logs (last 100 lines)
bunx @temps-sdk/cli runtime-logs --project my-project --environment production --tail 100

# Follow logs in real-time
bunx @temps-sdk/cli runtime-logs --project my-project --environment production --follow

# View logs for a specific deployment
bunx @temps-sdk/cli deployments logs --project my-project --deployment 123 --follow

# View deployment logs and limit output
bunx @temps-sdk/cli deployments logs --project my-project --deployment 123 --lines 200

Via API

# Get container logs
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/environments/{environment_id}/containers/{container_id}/logs?tail=100"

# Stream logs (Server-Sent Events)
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/environments/{environment_id}/containers/{container_id}/logs/stream"

# Get deployment logs
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/deployments/{deployment_id}/logs"

Log History and Live Viewer

The in-dashboard log viewer has two modes — History for querying past log data and Live for streaming real-time output. Both are available on the Logs tab of any container.

History tab

The History tab lets you query stored log data across configurable time windows.

Time-range presets

The time-range selector offers the following built-in presets:

  • 15m — last 15 minutes
  • 1h — last 1 hour
  • 6h — last 6 hours
  • 24h — last 24 hours
  • Last 7 days — rolling 7-day window
  • Last 30 days — rolling 30-day window
  • Custom range... — opens a date/time picker (see below)

Custom date/time range

Selecting Custom range... opens a date range picker with HH:MM precision. The picker pre-fills with the boundaries of the previously active preset so you have a sensible starting point. Set your start and end timestamps, then apply to load results.

Full-text search and the 24-hour cap

The search box supports full-text search across log messages. When the active time range exceeds 24 hours, full-text search is automatically disabled and the search input shows a tooltip explaining the cap. This is a server-side limit (MAX_FULLTEXT_HOURS). To use full-text search, select a preset of 24h or shorter, or set a custom range within a 24-hour window. Log level filters and other non-text filters remain available for any range.

Chronological ordering and scroll anchoring

Results are displayed in chronological order — oldest entries at the top, newest at the bottom — matching the convention of tools like journalctl and tail -f. When the first page loads, the viewer anchors the scroll position to the bottom so you immediately see the most recent entries without manually scrolling down.

Auto-loading older pages

Scrolling up near the top of the log list automatically triggers the next page of older entries. The viewer uses an IntersectionObserver sentinel placed 200px from the top: when the sentinel enters the viewport, older log pages are fetched and prepended above the current content. Scroll position is preserved during the prepend so the view does not jump. A Load older button is also present as an accessible fallback for keyboard and assistive-technology users.

Live tab

The Live tab streams log output from running containers as it arrives.

Status row

A status row at the top of the Live viewer displays real-time throughput information:

Live · 1,842 lines · ~34 lps
  • lines — total lines received in the current session
  • lps — lines per second, computed from a 5-second sliding window

When the incoming rate reaches or exceeds 60 lps, an amber sampled chip appears next to the counter. This indicates the buffer is rolling faster than can be rendered at full fidelity; the viewer continues to display logs but may skip intermediate lines to maintain readability.

Interval polling mode

The Live tab includes an Every Ns interval mode (selectable as Every 5s, Every 30s, or Every 60s). In this mode the viewer polls /api/logs/search with page_size=500 on each interval rather than holding a WebSocket connection open. The first poll fires immediately on entering the tab — there is no empty-screen delay while waiting for the first interval to elapse. This mode is useful when you want periodic snapshots rather than a continuous stream.

Auto-follow behavior

The Live viewer tracks new log entries and automatically scrolls to the bottom as they arrive. Scrolling up disengages auto-follow so you can review earlier output without the view jumping away. Auto-follow distinguishes between deliberate scroll input and programmatic layout changes:

  • Disengages follow: wheel events, touch scroll, keyboard navigation
  • Does not disengage follow: layout reflows caused by multi-line log entries expanding

Auto-follow re-engages when you scroll back to within 8px of the bottom. To re-engage manually, scroll to the bottom of the viewer.

Per-line fade-in

Freshly arrived log batches fade in over 120ms (opacity 0 to 1). The animation is suppressed automatically when the user's system has prefers-reduced-motion set.


Log Levels

Temps supports structured logging with different log levels:

  • Name
    Success
    Description

    Successful operations, completions, and positive outcomes. Look for ✅ emoji indicators.

  • Name
    Info
    Description

    General informational messages about application flow and state.

  • Name
    Warning
    Description

    Warnings about potential issues that don't prevent operation.

  • Name
    Error
    Description

    Error messages indicating failures or problems. Look for ❌ emoji indicators.


Searching and Filtering Logs

Search by Text

Use the search box in the logs viewer to find specific messages:

  • Exact match: "error connecting to database"
  • Case-insensitive: ERROR matches error, Error, ERROR
  • Partial match: database finds all lines containing "database"

Note: full-text search is only available when the active time range is 24 hours or less. See Full-text search and the 24-hour cap above.

Filter by Log Level

Filter logs to show only specific levels:

  1. Click the Filter button in the logs viewer
  2. Select log levels (Success, Info, Warning, Error)
  3. View filtered results

Filter by Time Range

View logs from specific time periods:

  1. Use the Time Range selector
  2. Choose a preset (15m, 1h, 6h, 24h, Last 7 days, Last 30 days) or select Custom range...
  3. Logs update to show only the selected period

Filter by Deployment

View logs for a specific deployment:

  1. Go to Deployments
  2. Select a deployment
  3. View logs specific to that deployment
  4. Compare logs across different deployments

Real-Time Log Streaming

Stream logs in real-time to see events as they happen:

In Dashboard

  1. Open the Logs tab for a container
  2. Switch to the Live tab
  3. Logs update automatically as new entries arrive
  4. Scroll to bottom to see latest logs; scroll up to pause auto-follow

Via API

// JavaScript example - Server-Sent Events
const eventSource = new EventSource(
  `/api/projects/${projectId}/environments/${environmentId}/containers/${containerId}/logs/stream`,
  {
    headers: {
      Authorization: `Bearer ${token}`,
    },
  },
);

eventSource.onmessage = (event) => {
  const logEntry = JSON.parse(event.data);
  console.log(logEntry.message);
};

Structured Logging Best Practices

To get the most out of Temps logging, use structured logging in your application:

JSON Logging

// Node.js example
console.log(
  JSON.stringify({
    level: "info",
    message: "User logged in",
    userId: 123,
    timestamp: new Date().toISOString(),
  }),
);
# Python example
import json
import logging

logging.info(json.dumps({
    'level': 'info',
    'message': 'User logged in',
    'user_id': 123,
    'timestamp': datetime.now().isoformat()
}))

Log Levels

Use appropriate log levels:

// Debug - detailed information for debugging
console.debug("Processing request", { requestId, userId });

// Info - general informational messages
console.info("User logged in", { userId });

// Warning - potential issues
console.warn("Rate limit approaching", { userId, requests: 95 });

// Error - errors that need attention
console.error("Database connection failed", { error: err.message });

Include Context

Always include relevant context in logs:

// Good: Includes context
console.log(
  JSON.stringify({
    level: "error",
    message: "Payment processing failed",
    userId: 123,
    orderId: 456,
    amount: 99.99,
    error: error.message,
    timestamp: new Date().toISOString(),
  }),
);

// Bad: Missing context
console.error("Payment failed");

Log Retention

  • Name
    Application Logs
    Description
    • Retention: 7 days by default - Configurable: Up to 90 days - Storage: Compressed and stored efficiently - Access: Available via dashboard and API
  • Name
    Build Logs
    Description
    • Retention: 30 days - Storage: Associated with deployments - Access: Available for successful and failed builds
  • Name
    Deployment Logs
    Description
    • Retention: 90 days - Storage: Full deployment history - Access: Available for all deployment attempts
  • Name
    Audit Logs
    Description
    • Retention: 1 year (configurable) - Storage: Securely stored for compliance - Access: Admin access only

Downloading Logs

Download logs for offline analysis or archival:

Via Dashboard

  1. Open the Logs tab
  2. Apply any filters you need
  3. Click Download button
  4. Choose format (text or JSON)
  5. Save to your computer

Via API

# Download container logs
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/environments/{environment_id}/containers/{container_id}/logs/download" \
  -o logs.txt

# Download deployment logs
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-temps-instance.com/api/projects/{project_id}/deployments/{deployment_id}/logs/download" \
  -o deployment-logs.txt

Troubleshooting with Logs

  • Name
    Application Crashes
    Description

    Symptoms: Container restarts, 502 errors What to check: 1. Look for error logs before restart 2. Check for out-of-memory errors 3. Review exception stack traces 4. Check for unhandled promise rejections (Node.js) Example log pattern: ERROR: Unhandled exception TypeError: Cannot read property 'id' of undefined at /app/src/routes/users.js:45:12

  • Name
    Slow Performance
    Description

    Symptoms: High response times, timeouts What to check: 1. Search for "slow" or "timeout" in logs 2. Look for database query logs 3. Check for external API call delays 4. Review request processing times Example log pattern: WARN: Database query took 5.2s INFO: External API call completed in 3.1s

  • Name
    Deployment Failures
    Description

    Symptoms: Deployments failing to complete What to check: 1. Review build logs for compilation errors 2. Check for missing dependencies 3. Look for configuration errors 4. Review deployment step logs Example log pattern: ERROR: Build failed npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! build: `next build`

  • Name
    Connection Issues
    Description

    Symptoms: Database or external service connection errors What to check: 1. Search for "connection" or "connect" errors 2. Look for timeout messages 3. Check for authentication failures 4. Review network-related errors Example log pattern: ERROR: Failed to connect to database Error: connect ECONNREFUSED 127.0.0.1:5432


Next Steps

Was this page helpful?