Expand description
Components with which common log formats can be constructed
Functions§
- apache_
combined - apache combined log format
- apache_
common - apache common log format
- body_
len_ human - formatter for the response body length, represented as a
human-readable string like
5 bytes
or10.1mb
. prints-
if there is no response body. seebytes
for the raw number of bytes - bytes
- formatter that prints the number of response body bytes as a
number. see
body_len_human
for a human-readable response body length with units - dev_
formatter - simple development-mode formatter
- header
Deprecated - please use
request_header
instead. it was a mistake to name thisheader
as it is not apparent whether it’s inbound or outbound. - ip
- formatter for the peer ip address of the connection
- method
- formatter for the conn’s http method that delegates to [
Method
]’sDisplay
implementation - request_
header - formatter-builder for a particular request header, formatted wrapped
in quotes.
""
if the header is not present - response_
header - formatter-builder for a particular response header, formatted wrapped
in quotes.
""
if the header is not present - response_
time - formatter for the wall-time duration with units that this http request-response cycle took, from the first bytes read to the completion of the response.
- secure
- formatter that prints an emoji if the request is secure as determined
by [
Conn::is_secure
] - status
- formatter for the http status
- timestamp
- formatter for the current timestamp. this represents the time that the log is written, not the beginning timestamp of the request
- url
- formatter for the current url or path of the request, including query
- version
- formatter for the http version, as delegated to the display
implementation of [
Version
]