# log to a file
basic_config(file = tempfile())
unlink(lgr$appenders$file$file) # cleanup
basic_config(file = tempfile(fileext = "jsonl"))
unlink(lgr$appenders$file$file) # cleanup
# log debug messages to a memory buffer
basic_config(threshold = "all", memory = "all", console = "info")
lgr$info("an info message")
lgr$debug("a hidden message")
show_log()
# reset to default config
basic_config()
Run the code above in your browser using DataLab