Learn R Programming

logger (version 0.4.0)

log_layout: Get or set log record layout

Description

Get or set log record layout

Usage

log_layout(layout = NULL, namespace = "global", index = 1)

Arguments

layout

function defining the structure of a log record, eg layout_simple(), layout_glue() or layout_glue_colors(), layout_json(), or generator functions such as layout_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

Run this code
old <- logger:::namespaces_set()
log_layout(layout_json())
log_info(42)
logger:::namespaces_set(old)

Run the code above in your browser using DataLab