Logs & Errors
Log viewer, error tracking, time-range filtering, and auditability.
Auditability Overview
Every action in a Crucible-managed engagement is logged. The Log and Errors tabs provide a complete audit trail of what happened, when, and in what order. This is critical for engagement documentation — proving what was tested, when testing started and stopped, and what issues were encountered.
Logs are persisted to the engagement's run directory as scan.log (human-readable) and scan.log.json (machine-readable). Errors are additionally written to errors.log. These files survive Crucible restarts and are included in engagement exports.
Log Tab
The Log tab shows a combined timeline of all events from all managed tools in the engagement.
Log Entry Types
Each log entry carries a level that determines its visual treatment:
- EVENT — Milestones and phase transitions: tool started, phase completed, engagement paused/resumed
- INFO — Informational notices: targets discovered, configuration loaded, tool version
- WARN — Non-fatal warnings: degraded performance, retry initiated, resource threshold approached
- ERROR — Execution errors in the tool's own code: unhandled exceptions, assertion failures
- EXCEPTION — Uncaught Python exceptions with full tracebacks
- TOOL_ERROR — Errors reported by third-party tools in their stdout/stderr (e.g. nuclei
[ERR], nmap "Failed to resolve")
Log Entry Fields
Each entry shows: timestamp (ISO 8601), level, tool (which managed tool produced it), and message. Entries are displayed in chronological order with the newest at the bottom.
Real-Time Streaming
New log entries stream in real time via Socket.IO without page refresh. The log view auto-scrolls to the latest entry unless you've scrolled up (scroll-lock detection). Scroll to the bottom to re-enable auto-scroll.
Errors Tab
The Errors tab is a filtered view showing only error-level entries: ERROR, EXCEPTION, TOOL_ERROR, FATAL, and CRITICAL. This provides a focused view of what went wrong without scrolling through thousands of INFO/EVENT lines.
Error Sources
- Tool Errors (TOOL_ERROR) — Errors detected in third-party tool output. Automatically extracted by the tool runner's error detection regex library. Examples: nuclei template errors, nmap host resolution failures, sslscan connection timeouts.
- Execution Errors (ERROR) — Errors in the managed tool's own Python code. Include function name, line number, and error message.
- Exceptions (EXCEPTION) — Unhandled exceptions with full Python tracebacks. These indicate bugs in the tool code.
- Fatal Errors (FATAL) — Unrecoverable errors that caused the tool to stop.
Error Investigation
Each error entry links to the relevant tool and phase. For TOOL_ERROR entries, the .log sibling file (Section 14 of the pr0t31n standard) contains the full stdout/stderr of the tool invocation that produced the error — use this for root-cause analysis.
Time-Range Filtering
Both the Log and Errors tabs provide From and To datetime pickers at the top of the tab. These filter entries by timestamp:
- From — Show only entries at or after this time. Leave empty for no lower bound.
- To — Show only entries at or before this time. Leave empty for no upper bound.
- Clear Range — Reset both pickers and show all entries.
The filter is inclusive on both ends. This is useful for isolating what happened during a specific testing window — for example, filtering to the exact timeframe when a particular tool was running.
Tab Badge Counters
Both the Log tab and Errors tab display a count badge (pill) in the tab header. These badges show the error count only — not the total number of log entries. This applies to both tabs: the Log tab pill shows how many error-level entries exist in the full log, and the Errors tab pill shows the same count.
The error-level classifier matches: ERROR, EXCEPTION, TOOL_ERROR, FATAL, and CRITICAL. INFO, EVENT, and WARN entries do not increment the pill counter.
Pills update in real time as new entries arrive via Socket.IO, and reset to 0 when logs are cleared.
Per-Tool Log Files
In addition to the combined log view, each managed tool produces its own log files in its run directory:
scan.log— Human-readable timestamped log (one line per event)scan.log.json— Machine-readable JSON log events (JSON array)errors.log— ERROR-level entries only
Every third-party tool invocation also produces a .log sibling file (per Section 14) containing the exact command, tool version, start/end time, exit code, full stdout, and stderr. These provide forensic-level detail for each tool execution.
Engagement Hours & Scheduling Audit
When Engagement Hours are configured (Console tab → Engagement Hours), all start/stop events driven by the schedule are logged:
- Schedule created — Records the allowed testing window (start time, end time, timezone, allowed days)
- Scheduled start — Tools launched by the scheduler at the configured start time
- Scheduled pause — Tools paused when the testing window ends
- Manual override — When the user starts/stops tools outside the scheduled window
This provides a complete timeline of when testing was actively running, which is critical for engagement reporting and dispute resolution.
Log Persistence
All logs are persisted to the engagement's run directory on disk. They survive:
- Crucible restarts
- Browser disconnections
- Tool crashes
- System reboots (if the filesystem is intact)
Logs are included in engagement exports (JSON and ZIP). The scan.log.json format is designed for programmatic ingestion by Prometheus and other analysis tools.
In-memory log buffers hold the most recent 2,000 entries for fast UI rendering. The full log on disk has no size limit but may be truncated at display time in the browser for performance.