Skip to content

Log Streaming

Real-time log streaming provides visibility into command execution on targets.

Access logs from the deployment detail page:

┌─────────────────────────────────────────────────────────────┐
│ Deployment Logs [Connected] │
├─────────────────────────────────────────────────────────────┤
│ [All Levels ▼] [Search logs...________] Auto-scroll [✓] │
├─────────────────────────────────────────────────────────────┤
│ │
│ [14:30:01] INFO [web-prod-01] Starting migration script │
│ [14:30:02] INFO [web-prod-01] Running migration 001 │
│ [14:30:03] INFO [web-prod-01] Migration 001 complete │
│ [14:30:04] INFO [web-prod-01] Running migration 002 │
│ [14:30:05] INFO [web-prod-01] Migration 002 complete │
│ [14:30:06] INFO [web-prod-01] All migrations complete │
│ [14:30:07] INFO [web-prod-01] Stopping service... │
│ [14:30:08] INFO [web-prod-01] Service stopped │
│ [14:30:09] INFO [web-prod-01] Copying files... │
│ [14:30:15] INFO [web-prod-01] Files copied (1.2 GB) │
│ [14:30:16] INFO [web-prod-01] Starting service... │
│ [14:30:18] INFO [web-prod-01] Service started │
│ ▼ (streaming...) │
│ │
├─────────────────────────────────────────────────────────────┤
│ 12 of 12 logs Scroll: Auto │
└─────────────────────────────────────────────────────────────┘

Filter by severity level using the All Levels dropdown:

LevelContent
AllAll log entries
InfoInformational messages
WarnWarnings
ErrorError messages
DebugVerbose diagnostic output

Use the search box to filter log entries. See Text Search below.

Normal command output:

14:30:09 [stdout] Copying files to /opt/app...
14:30:10 [stdout] file1.txt copied
14:30:11 [stdout] file2.txt copied
14:30:12 [stdout] Copy complete

Error output and warnings:

14:30:15 [stderr] Warning: Config file not found, using defaults
14:30:16 [stderr] Error: Permission denied for /etc/app/config

Mantis orchestration messages:

14:30:00 [system] Starting step: deploy-backend
14:30:00 [system] Executing action: copy-files (v1.2.0)
14:30:20 [system] Step completed in 20 seconds

Logs stream in real-time as commands execute:

When enabled, the log viewer automatically scrolls to new content:

[✓] Auto-scroll - Follows new output
[ ] Auto-scroll - Manual scrolling
┌──────────────────────────────────┐
│ ● Connected │
└──────────────────────────────────┘

If disconnected:

┌──────────────────────────────────┐
│ ○ Reconnecting (2/10) │
└──────────────────────────────────┘

Each log entry shows a timestamp, a colour-coded level badge, an optional target name, and the message body:

[14:30:01] INFO [web-prod-01] Copying files to /opt/app...
[14:30:02] WARN [web-prod-01] Config file not found, using defaults
[14:30:03] ERROR [web-prod-01] Permission denied for /etc/app/config

Log entries are colour-coded by their severity level badge:

LevelBadge colour
InfoTertiary
WarnWarning
ErrorError/Red
DebugSurface/muted

The message body is rendered as monospace plain text; no pattern-based highlighting is applied to the message content itself.

View logs from all targets simultaneously:

┌─────────────────────────────────────────────────────────────┐
│ Logs: All Targets │
├─────────────────────────────────────────────────────────────┤
│ │
│ 14:30:01 [web-01] Starting deployment... │
│ 14:30:01 [web-02] Starting deployment... │
│ 14:30:02 [web-01] Copying files... │
│ 14:30:03 [web-02] Copying files... │
│ 14:30:05 [web-01] Files copied │
│ 14:30:06 [web-02] Files copied │
│ 14:30:07 [web-01] Starting service... │
│ 14:30:08 [web-02] Starting service... │
│ │
└─────────────────────────────────────────────────────────────┘

Logs are interleaved by timestamp, showing parallel execution.

The search box live-filters the visible log list to entries whose message contains the search text. Filtering is applied with a short debounce (150 ms) to avoid reprocessing on every keystroke. The footer shows how many entries match out of the total loaded:

┌─────────────────────────────────────────────────────────────┐
│ [Search logs...______] │
├─────────────────────────────────────────────────────────────┤
│ │
│ [14:30:15] ERROR [web-prod-01] Error: Connection refused │
│ [14:30:17] ERROR [web-prod-01] Error: Connection refused │
│ [14:30:19] ERROR [web-prod-01] Error: Max retries exceeded │
│ │
├─────────────────────────────────────────────────────────────┤
│ 3 of 12 logs Scroll: Auto │
└─────────────────────────────────────────────────────────────┘

Search is always case-insensitive and performs a simple substring match against the log message. Complex patterns (OR terms, exact phrase with quotes, regex) are not supported.

Full logs available in real-time during execution.

Logs are retained based on configuration:

RetentionDescription
Short-termFull logs for recent deployments
Long-termSummary logs for older deployments
ArchivedCompressed logs for compliance

View logs from the command line:

Terminal window
# Stream logs for a deployment
mantisctl deployment logs <deployment-id> --follow
# View logs for a specific target
mantisctl deployment logs <deployment-id> --target <target-id>
# Filter by log level
mantisctl deployment logs <deployment-id> --level error
# Fetch historical logs (non-streaming), limiting the number of entries
mantisctl deployment logs <deployment-id> --limit 500
OptionDescription
--follow, -fStream live logs
--level, -lFilter by log level (debug/info/warn/error)
--target, -tFilter by target ID
--historyNo effect — historical logs are returned by default when --follow is omitted
--limitMaximum number of log entries (default 100)
  1. Search for “error” or “fail”
  2. Check stderr output
  3. Look at exit codes in system messages
14:30:00 [system] Starting step: copy-files
14:35:00 [system] Step completed in 300 seconds ← Slow!
14:30:15 [system] Action failed: deploy-app
14:30:15 [system] Exit code: 1
14:30:15 [stderr] Error: Package not found: nodejs
14:30:15 [stderr] Please install required dependencies

Write scripts that produce clear logs:

Terminal window
echo "Starting deployment of $APP_NAME v$VERSION"
echo "Copying files to $DEST_DIR..."
# ...
echo "Deployment complete. Service running on port $PORT"

For easier parsing:

Terminal window
echo "[INFO] Starting step 1 of 3"
echo "[INFO] Processing 100 items"
echo "[SUCCESS] Step 1 complete"

Never log secrets:

Terminal window
# Bad
echo "Connecting with password: $DB_PASSWORD"
# Good
echo "Connecting to database..."

Provide enough information:

Terminal window
echo "Deploying $APP_NAME v$VERSION to $HOSTNAME at $(date)"

Cause: SSE (Server-Sent Events) connection issue

Solution: Refresh the page or check network connection. The log stream is a long-lived HTTP GET that emits text/event-stream events; the client reconnects over normal HTTP rather than pushing over the stream.

Cause: Large output may be buffered

Solution: Wait for step completion or check target directly

Cause: Very large log volume

Solution: Filter by log level or use the search box to narrow visible entries