smdocker_log {smdocker} | R Documentation |
smdocker logging system
Description
Ability to configure smdocker logging system, through the use of smdocker
helper function smdocker_log
or R:base
options
function. options
configurable
parameters:
smdocker.log_level
(integer): The minimum log level that should be trackedsmdocker.log_file
(character): path for logs to populate, default output logs to console.smdocker.log_timestamp_fmt
(character): seeformat.POSIXct()
Usage
smdocker_log(
level = 3L,
file = "",
timestamp_fmt = "%Y-%m-%d %H:%M:%OS3"
)
Arguments
level |
(integer): the level logging threshold.
|
file |
(character): path for logs to populate, default output logs to console. |
timestamp_fmt |
(character): timestamp format, see |
Value
NULL
invisible
Examples
## Not run:
# log to a file
temp_file <- tempfile()
smdocker_log(file = temp_file)
# change log threshold to INFO
smdocker_log(level = 3L)
# reset to default config
smdocker_log()
# options() equivalents:
# log to a file
temp_file <- tempfile()
options(smdocker.log_file = temp_file)
# change log threshold to INFO
options(smdocker.log_level = 3L)
## End(Not run)
[Package smdocker version 0.1.4 Index]