.layout_json_custom {azlogr} | R Documentation |
This is an extended function of layout_json
function
from 'logger'
package. Objective is to add additional component in the
logging layout in JSON format so that they can also be reported while
logging along with the components collected by
.add_meta_variables
.
.layout_json_custom(
log_fields = c("time", "level", "ns", "ans", "topenv", "fn", "node", "arch", "os_name",
"os_release", "os_version", "pid", "user", "msg"),
additional_fields = NULL,
enforce_ascii_msg = TRUE,
enforce_tz_utc = TRUE
)
log_fields |
Vector of components which are collected in
|
additional_fields |
A named vector of type list with key-value pairs of
additional meta data which needs to be added in logging context on top of
|
enforce_ascii_msg |
If |
enforce_tz_utc |
If |
Returns a generator function typically to be used by
log_layout
function.