Skip to main content

log_response

Function log_response 

Source
pub fn log_response(
    status: u16,
    duration_ms: u128,
    headers: Option<&HeaderMap>,
    body: Option<&str>,
    max_body_len: usize,
    secret_ctx: Option<&SecretContext>,
)
Expand description

Logs an HTTP response with optional headers and body

ยงArguments

  • status - HTTP status code
  • duration_ms - Request duration in milliseconds
  • headers - Optional response headers (sensitive headers will be redacted)
  • body - Optional response body
  • max_body_len - Maximum body length to log before truncation
  • secret_ctx - Optional context for dynamic secret redaction