custom_logging | R Documentation |
Useful for e.g. read and write operations on databases etc. that are not automatically captured.
log_read(file, log = Sys.getenv("WHIRL_LOG_MSG"))
log_write(file, log = Sys.getenv("WHIRL_LOG_MSG"))
log_delete(file, log = Sys.getenv("WHIRL_LOG_MSG"))
file |
|
log |
|
The default environment variable WHIRL_LOG_MSG
is set in the session used
to log scripts, and input is automatically captured in the resulting log.
If run outside of whirl, meaning when the above environment variable is
unset, the operations are streamed to stdout()
. By default the console.
# Stream logs to console since `WHIRL_LOG_MSG` is not set:
log_read("my/folder/input.txt")
log_write("my/folder/output.txt")
log_delete("my/folder/old_output.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.