Generate log layout function rendering JSON
See also
Other log_layouts:
get_logger_meta_variables()
,
layout_blank()
,
layout_glue()
,
layout_glue_colors()
,
layout_glue_generator()
,
layout_json_parser()
,
layout_logging()
,
layout_simple()
Examples
log_layout(layout_json())
log_info(42)
#> {"time":"2024-10-21 07:31:17","level":"INFO","ns":"global","ans":"global","topenv":"R_GlobalEnv","fn":"eval","node":"fv-az1198-739","arch":"x86_64","os_name":"Linux","os_release":"6.5.0-1025-azure","os_version":"#26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024","pid":8176,"user":"runner","msg":"42"}
log_info("ok {1:3} + {1:3} = {2*(1:3)}")
#> {"time":"2024-10-21 07:31:17","level":"INFO","ns":"global","ans":"global","topenv":"R_GlobalEnv","fn":"eval","node":"fv-az1198-739","arch":"x86_64","os_name":"Linux","os_release":"6.5.0-1025-azure","os_version":"#26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024","pid":8176,"user":"runner","msg":"ok 1 + 1 = 2"}
#> {"time":"2024-10-21 07:31:17","level":"INFO","ns":"global","ans":"global","topenv":"R_GlobalEnv","fn":"eval","node":"fv-az1198-739","arch":"x86_64","os_name":"Linux","os_release":"6.5.0-1025-azure","os_version":"#26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024","pid":8176,"user":"runner","msg":"ok 2 + 2 = 4"}
#> {"time":"2024-10-21 07:31:17","level":"INFO","ns":"global","ans":"global","topenv":"R_GlobalEnv","fn":"eval","node":"fv-az1198-739","arch":"x86_64","os_name":"Linux","os_release":"6.5.0-1025-azure","os_version":"#26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024","pid":8176,"user":"runner","msg":"ok 3 + 3 = 6"}