Expand description
In-memory ring buffer of recent HTTP requests.
LogLayer middleware records each completed request. The global
RequestLog holds the most recent N entries (default 1000). MCP tools
recent_requests and recent_errors read from it.
§Example
use rust_web_server::app::App;
use rust_web_server::core::New;
use rust_web_server::request_log::{self, LogLayer};
let app = App::new().wrap(LogLayer);
let entries = request_log::global().recent(20);Structs§
- LogEntry
- A single recorded request.
- LogLayer
- Middleware that records each request into the global
RequestLog. - Request
Log - Ring buffer of recent requests.
Functions§
- global
- Return the process-wide
RequestLogsingleton (capacity 1000).