Skip to contents

Generate log layout function rendering JSON

Usage

layout_json(
  fields = c("time", "level", "ns", "ans", "topenv", "fn", "node", "arch", "os_name",
    "os_release", "os_version", "pid", "user", "msg")
)

Arguments

fields

character vector of field names to be included in the JSON

Value

character vector

Note

This functionality depends on the jsonlite package.

See also

Examples

if (FALSE) { # \dontrun{
log_layout(layout_json())
log_info(42)
log_info("ok {1:3} + {1:3} = {2*(1:3)}")
} # }