openlog | R Documentation |
Open a new logfile
openlog(file, loglevel = -Inf, append = FALSE, sink = FALSE)
file |
Name of logfile (character or writeable |
loglevel |
Minimum priority level (numeric, optional) |
append |
Append to logfile? (logical, optional) |
sink |
Send all console output to logfile? (logical, optional) |
Open a new logfile. Messages will only appear in the logfile
if their level
exceeds the log's loglevel
;
this allows you to easily change the amount of detail being logged.
Re-opening a logfile will erase the previous output unless append
is TRUE. Opening a new logfile when one is already open will temporarily
switch logging to that new file.
If sink
is TRUE, all screen output will be captured (via sink
).
Invisible fully-qualified name of log file.
printlog
closelog
logfile <- openlog("test.log")
printlog("message")
closelog()
readLines(logfile)
file.remove(logfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.