log_config | R Documentation |
log_config()
initialises the log.rx environment, adds its attributes, and
sets them
log_config(file = NA, log_name = NA, log_path = NA)
file |
String. Path to file executed. Optional |
log_name |
String. Name of log file. Optional |
log_path |
String. Path to log file. Optional |
Nothing
dir <- tempdir()
text <- 'print("Hello, Timberperson!")'
fileConn <- file(file.path(dir, "hello.R"))
writeLines(text, fileConn)
close(fileConn)
file <- file.path(dir, "hello.R")
# Initialise and configure the log.rx environment
log_config(file)
# Run the script and record results, outputs, messages, errors, and warnings
logrx:::run_safely_loudly(file)
# Write the log
log_write(file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.