Module trillium_logger::formatters
source · Expand description
Components with which common log formats can be constructed
Functions§
- 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 - 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 - simple development-mode formatter
- headerDeprecatedplease use
request_header
instead. it was a mistake to name thisheader
as it is not apparent whether it’s inbound or outbound. - formatter for the peer ip address of the connection
- formatter-builder for a particular request header, formatted wrapped in quotes.
""
if the header is not present - formatter-builder for a particular response header, formatted wrapped in quotes.
""
if the header is not present - 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.
- formatter that prints an emoji if the request is secure as determined by
Conn::is_secure
- formatter for the http status
- formatter for the current timestamp. this represents the time that the log is written, not the beginning timestamp of the request
- formatter for the current url or path of the request, including query
- formatter for the http version, as delegated to the display implementation of
Version