old <- logger:::namespaces_set()
example_layout <- layout_glue_generator(
format = "{node}/{pid}/{ns}/{ans}/{topenv}/{fn} {time} {level}: {msg}"
)
example_layout(INFO, "try {runif(1)}")
log_layout(example_layout)
log_info("try {runif(1)}")
logger:::namespaces_set(old)
Run the code above in your browser using DataLab