Skip to main content

Backend Logs

The Logs page streams real-time application logs from the Rackscope backend directly in the Web UI, without needing SSH or docker logs.

Accessing Logs​

Navigate to Logs in the bottom of the sidebar, or go to /logs.

The link is visible by default. To hide it (kiosk or public deployments):

# config/app.yaml
features:
show_logs: false

Or toggle it in Settings → Views → Pages & Navigation → Backend Logs.


Interface​

Live mode vs Paused mode​

ModeBehaviour
Live (default)Connects via SSE — new log lines appear in real time (~0.5 s latency). Green pulsing dot in the button.
PausedDisconnects SSE. Shows a snapshot. Use Refresh to manually reload.

Click the Live / Paused button in the page header to toggle.

Filters​

ControlDescription
Level pillsFilter by ALL, DEBUG, INFO, WARNING, ERROR.
Search barCase-insensitive substring match on message and logger name.
Entry countShows the number of lines currently displayed.

Reverse order​

The ↕ icon button toggles between:

  • Oldest first (default) — chronological, auto-scroll follows the bottom
  • Newest first — most recent entry at the top, auto-scroll follows the top

Auto-scroll is disabled when you scroll away from the tracked edge and re-enables when you scroll back.

Actions​

ButtonAction
Live / PausedToggle SSE stream
Refresh (paused only)Reload snapshot
↕Toggle reverse order
↓ ExportDownload current buffer as rackscope-logs-<timestamp>.json
ClearEmpty the server-side buffer immediately

Row detail​

Click any log row that has an exception or a request_id to expand it:

  • request_id — correlates with the X-Request-ID response header
  • Exception — full Python traceback, pre-formatted

Technical details​

In-memory ring buffer​

Logs are kept in a 1 000-entry ring buffer in RAM. The buffer is:

  • Never persisted to disk
  • Cleared when the backend container restarts
  • Cleared via the Clear button or DELETE /api/logs

For persistent log storage, mount a volume and redirect stdout to a file, or use a log aggregator (Loki, Elastic, etc.).

Sensitive field redaction​

Secrets are stripped at capture time, before entering the buffer:

PatternRedacted to
URL credentials http://user:secret@hosthttp://user:***@host
password=…, token=…, secret_key=…, etc.password=***

SSE stream limits​

ParameterValue
Max concurrent streams5
Auto-disconnect after10 minutes
Heartbeat interval30 seconds
Poll interval0.5 seconds

API endpoints​

All endpoints require admin access (require_admin dependency — see Admin Endpoint Protection).

MethodEndpointDescription
GET/api/logsRecent entries. Params: n (max 1000), level, search, since_seq
GET/api/logs/streamSSE stream. Params: level, search
DELETE/api/logsClear the buffer

Log levels reference​

LevelColourMeaning
DEBUGGrayVerbose internal state — disabled by default
INFOBlueNormal operations: requests, topology reload, cache hits
WARNINGAmberNon-critical issues: missed cache, slow query, retried request
ERRORRedFailures requiring attention: Prometheus unreachable, YAML parse error
CRITICALRed boldFatal errors — backend may be in a degraded state

Default log level is INFO. Change it with the environment variable:

RACKSCOPE_LOG_LEVEL=DEBUG