Useful for e.g. read and write operations on databases etc. that are not automatically captured.
Usage
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"))
Arguments
- file
character()
description of the file that was read, written or deleted.- log
character()
path to the log file.
Details
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.