View source: R/configurations.R
set_logfile | R Documentation |
Set the log file that loggit will write to. No logs outside of a temporary
directory will be written until this is set explicitly, as per CRAN policy.
Therefore, the default behavior is to create a file named loggit.log
in
your system's temporary directory.
set_logfile(logfile = NULL, confirm = TRUE)
logfile |
Full or relative path to log file. If not provided, will write
to |
confirm |
Print confirmation of log file setting? Defaults to |
A suggested use of this function would be to call it early, to log to the
current working directory, as follows: set_logfile(paste0(getwd(), "/loggit.log"))
. If you are using loggit
in your package, you can wrap
this function in .onLoad()
so that the logfile is set when your package
loads.
set_logfile(file.path(tempdir(), "loggit.log"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.