powered by
Generate log layout function rendering JSON
layout_json(fields = default_fields())
character vector
character vector of field names to be included in the JSON
Other log_layouts: get_logger_meta_variables(), layout_blank(), layout_glue(), layout_glue_colors(), layout_glue_generator(), layout_json_parser(), layout_logging(), layout_simple()
get_logger_meta_variables()
layout_blank()
layout_glue()
layout_glue_colors()
layout_glue_generator()
layout_json_parser()
layout_logging()
layout_simple()
old <- logger:::namespaces_set() log_layout(layout_json()) log_info(42) log_info("ok {1:3} + {1:3} = {2*(1:3)}") logger:::namespaces_set(old)
Run the code above in your browser using DataLab