Skip to main content

Module access_log

Module access_log 

Source
Expand description

One INFO line per response on target access, since production runs at INFO, where TraceLayer says nothing.

Functions§

agent_label 🔒
Bounded, and to_str admits only visible ASCII, so the agent cannot forge log lines.
bytes_label 🔒
Content-Length when the handler set it, otherwise the body’s exact size, which hyper only turns into a header later.
key_label 🔒
- without a key, malformed for one that could not be minted, otherwise the first 12 hex chars of its hash, as token list prints them; never the key.
log_response
Middleware logging method, target, status, bytes, time to the response head (a download’s body is still streaming), the key’s hash prefix and the agent.