log_enable | R Documentation |
Assigns the necessary global scope objects for logging with "log4r".
log_enable(
logfile_loc = NULL,
pos = 1,
logger_nm = my_logger,
appender_nm = file_app
)
logfile_loc |
The path to the logfile. Suggested use "logs/logfile.txt". |
pos |
The environment which to assign pipeline_message. Defaults to 1, equivalent to the .GlobalEnv. |
logger_nm |
What to call the logger. Provide unquoted strings with no spaces. Defaults to my_logger. |
appender_nm |
What to call the appender function. Provide unquoted strings with no spaces. Defaults to file_app. |
Creates logger and file appender.
# create logging infrastructure
log_file_ops(dir_path = "logs/logfile.txt")
# enable logging
log_enable(logfile_loc = "logs/logfile.txt")
# tidy up environment
unlink("logs", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.