Skip to main content
MonoRelay records every API request to a SQLite database, giving you a complete audit trail of relay traffic. Each entry captures timing, token usage, the full request and response content, and detailed error information when a call fails. Logs are viewable in real time through the Request Logs page in the admin dashboard, which uses Server-Sent Events to stream new entries as they arrive.

What gets logged

Each log entry stores the following fields:

Viewing logs in the dashboard

Open the Request Logs page from the sidebar. New requests appear at the top of the table in real time without needing a manual refresh. Click any row to expand it and view the full request and response content side by side. Error entries are automatically expanded so failures are immediately visible. The expanded view has two tabs — Relay shows the upstream request sent to the provider, and Client shows the downstream request received from your application. Each content block can be toggled between a readable conversational view and raw JSON. Admins see logs for all users; regular users see only their own requests.

Log retention

Entries older than max_age_days days are automatically deleted on startup. Set this to 0 to disable automatic cleanup and retain all logs indefinitely.

Logging configuration

Add a logging block to config.yml to control where logs are stored and how much content is captured:
config.yml
Full request and response bodies are always stored regardless of content_preview_length. The preview length only affects the truncated summary shown in the table. Full content is fetched on demand when you expand a log entry.
Use the limit selector in the top-right of the logs page to choose how many recent entries to load (20, 50, 100, or 200). Admins can clear all logs for all users using the Clear logs button. The table is sorted by timestamp descending, with in-flight requests shown at the top while they are still processing.