hypercorn.logging module

class hypercorn.logging.AccessLogAtoms(request: dict, response: dict, request_time: float)

Bases: dict

class hypercorn.logging.Logger(config: Config)

Bases: object

async access(request: dict, response: dict, request_time: float) → None
atoms(request: dict, response: dict, request_time: float) → Mapping[str, str]

Create and return an access log atoms dictionary.

This can be overidden and customised if desired. It should return a mapping between an access log format key and a value.

async critical(message: str, *args: Any, **kwargs: Any) → None
async debug(message: str, *args: Any, **kwargs: Any) → None
async error(message: str, *args: Any, **kwargs: Any) → None
async exception(message: str, *args: Any, **kwargs: Any) → None
async info(message: str, *args: Any, **kwargs: Any) → None
async log(level: int, message: str, *args: Any, **kwargs: Any) → None
async warning(message: str, *args: Any, **kwargs: Any) → None