logger_dependency

safir.dependencies.gafaelfawr.logger_dependency = <safir.dependencies.logger.LoggerDependency object>

Provides a structlog logger configured with request information.

The following additional information will be included:

  • A UUID for the request

  • The method and URL of the request

  • The IP address of the client

  • The User-Agent header of the request, if any.

The results of XForwardedMiddleware will be honored if present. The last three pieces of information will be added using naming consistent with the expectations of Google Log Explorer so that the request information will be liftedn into the appropriate JSON fields for complex log queries.