Log Streaming
Real-time log streaming provides visibility into command execution on targets.
Log Viewer
Section titled “Log Viewer”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 │└─────────────────────────────────────────────────────────────┘Filtering Logs
Section titled “Filtering Logs”By Log Level
Section titled “By Log Level”Filter by severity level using the All Levels dropdown:
| Level | Content |
|---|---|
| All | All log entries |
| Info | Informational messages |
| Warn | Warnings |
| Error | Error messages |
| Debug | Verbose diagnostic output |
By Text
Section titled “By Text”Use the search box to filter log entries. See Text Search below.
Log Output Streams
Section titled “Log Output Streams”Standard Output (stdout)
Section titled “Standard Output (stdout)”Normal command output:
14:30:09 [stdout] Copying files to /opt/app...14:30:10 [stdout] file1.txt copied14:30:11 [stdout] file2.txt copied14:30:12 [stdout] Copy completeStandard Error (stderr)
Section titled “Standard Error (stderr)”Error output and warnings:
14:30:15 [stderr] Warning: Config file not found, using defaults14:30:16 [stderr] Error: Permission denied for /etc/app/configSystem Messages
Section titled “System Messages”Mantis orchestration messages:
14:30:00 [system] Starting step: deploy-backend14:30:00 [system] Executing action: copy-files (v1.2.0)14:30:20 [system] Step completed in 20 secondsReal-Time Streaming
Section titled “Real-Time Streaming”Live Output
Section titled “Live Output”Logs stream in real-time as commands execute:
Auto-Scroll
Section titled “Auto-Scroll”When enabled, the log viewer automatically scrolls to new content:
[✓] Auto-scroll - Follows new output[ ] Auto-scroll - Manual scrollingConnection Status
Section titled “Connection Status”┌──────────────────────────────────┐│ ● Connected │└──────────────────────────────────┘If disconnected:
┌──────────────────────────────────┐│ ○ Reconnecting (2/10) │└──────────────────────────────────┘Log Display
Section titled “Log Display”Entry Format
Section titled “Entry Format”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/configLevel Badge Colours
Section titled “Level Badge Colours”Log entries are colour-coded by their severity level badge:
| Level | Badge colour |
|---|---|
| Info | Tertiary |
| Warn | Warning |
| Error | Error/Red |
| Debug | Surface/muted |
The message body is rendered as monospace plain text; no pattern-based highlighting is applied to the message content itself.
Multi-Target Log View
Section titled “Multi-Target Log View”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.
Searching Logs
Section titled “Searching Logs”Text Search
Section titled “Text Search”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.
Log Retention
Section titled “Log Retention”During Deployment
Section titled “During Deployment”Full logs available in real-time during execution.
After Completion
Section titled “After Completion”Logs are retained based on configuration:
| Retention | Description |
|---|---|
| Short-term | Full logs for recent deployments |
| Long-term | Summary logs for older deployments |
| Archived | Compressed logs for compliance |
CLI Log Access
Section titled “CLI Log Access”View logs from the command line:
# Stream logs for a deploymentmantisctl deployment logs <deployment-id> --follow
# View logs for a specific targetmantisctl deployment logs <deployment-id> --target <target-id>
# Filter by log levelmantisctl deployment logs <deployment-id> --level error
# Fetch historical logs (non-streaming), limiting the number of entriesmantisctl deployment logs <deployment-id> --limit 500CLI Options
Section titled “CLI Options”| Option | Description |
|---|---|
--follow, -f | Stream live logs |
--level, -l | Filter by log level (debug/info/warn/error) |
--target, -t | Filter by target ID |
--history | No effect — historical logs are returned by default when --follow is omitted |
--limit | Maximum number of log entries (default 100) |
Troubleshooting with Logs
Section titled “Troubleshooting with Logs”Finding Errors
Section titled “Finding Errors”- Search for “error” or “fail”
- Check stderr output
- Look at exit codes in system messages
Identifying Slow Steps
Section titled “Identifying Slow Steps”14:30:00 [system] Starting step: copy-files14:35:00 [system] Step completed in 300 seconds ← Slow!Debugging Command Failures
Section titled “Debugging Command Failures”14:30:15 [system] Action failed: deploy-app14:30:15 [system] Exit code: 114:30:15 [stderr] Error: Package not found: nodejs14:30:15 [stderr] Please install required dependenciesBest Practices
Section titled “Best Practices”1. Log Meaningful Output
Section titled “1. Log Meaningful Output”Write scripts that produce clear logs:
echo "Starting deployment of $APP_NAME v$VERSION"echo "Copying files to $DEST_DIR..."# ...echo "Deployment complete. Service running on port $PORT"2. Use Structured Output
Section titled “2. Use Structured Output”For easier parsing:
echo "[INFO] Starting step 1 of 3"echo "[INFO] Processing 100 items"echo "[SUCCESS] Step 1 complete"3. Handle Sensitive Data
Section titled “3. Handle Sensitive Data”Never log secrets:
# Badecho "Connecting with password: $DB_PASSWORD"
# Goodecho "Connecting to database..."4. Include Context
Section titled “4. Include Context”Provide enough information:
echo "Deploying $APP_NAME v$VERSION to $HOSTNAME at $(date)"Troubleshooting
Section titled “Troubleshooting”Logs Not Streaming
Section titled “Logs Not Streaming”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.
Incomplete Logs
Section titled “Incomplete Logs”Cause: Large output may be buffered
Solution: Wait for step completion or check target directly
Log Viewer Slow
Section titled “Log Viewer Slow”Cause: Very large log volume
Solution: Filter by log level or use the search box to narrow visible entries
Next Steps
Section titled “Next Steps”- Monitoring - Track deployment progress
- Troubleshooting - Resolve issues
- Cancellation - Stop deployments
- Overview - Return to deployments overview
