Skip to main content

build_entry

Function build_entry 

Source
pub fn build_entry(
    ctx: &Context,
    log_format: Option<&HashMap<String, Value>>,
    include_req_body: bool,
    include_resp_body: bool,
) -> Value
Expand description

Builds a log entry for ctx.

When log_format is Some, produces a flat object whose values are the $var-interpolated templates. When None, produces the default structured entry. include_req_body / include_resp_body add the (UTF-8 lossy) bodies.