Get or set log record layout
Arguments
- layout
function defining the structure of a log record, eg
layout_simple()
,layout_glue()
orlayout_glue_colors()
,layout_json()
, or generator functions such aslayout_glue_generator()
, default NULL- namespace
logger namespace
- index
index of the logger within the namespace
See also
Other log configutation functions:
log_appender()
,
log_formatter()
,
log_threshold()
Examples
log_layout(layout_json())
log_info(42)
#> {"time":"2025-01-28 13:49:32","level":"INFO","ns":"global","ans":"global","topenv":"R_GlobalEnv","fn":"eval","node":"fv-az1370-267","arch":"x86_64","os_name":"Linux","os_release":"6.8.0-1020-azure","os_version":"#23-Ubuntu SMP Mon Dec 9 16:58:58 UTC 2024","pid":9760,"user":"runner","msg":"42"}