Skip to main content

Module logging

Module logging 

Source
Expand description

Request and response logging utilities with automatic secret redaction.

This module provides logging capabilities for HTTP requests and responses, with built-in automatic redaction of sensitive information including:

  • Authorization headers
  • API keys in query parameters
  • Values matching configured x-aperture-secret environment variables

Structs§

SecretContext
Context containing resolved secret values for dynamic redaction.

Functions§

get_max_body_len
Gets the maximum body length from APERTURE_LOG_MAX_BODY environment variable
log_request
Logs an HTTP request with optional headers and body
log_response
Logs an HTTP response with optional headers and body
redact_sensitive_value
Redacts sensitive values from strings
redact_url_query_params
Redacts sensitive query parameters from a URL
should_redact_header
Checks if a header name should be redacted.