Description Usage Arguments See Also Examples
Get or set log record appender function
1 | log_appender(appender, namespace = "global", index = 1)
|
appender |
function delivering a log record to the destination, eg |
namespace |
logger namespace |
index |
index of the logger within the namespace |
logger
, log_threshold
, log_layout
and log_formatter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
## change appender to "tee" that writes to the console and a file as well
t <- tempfile()
log_appender(appender_tee(t))
log_info(42)
log_info(42:44)
readLines(t)
## poor man's tee by stacking loggers in the namespace
t <- tempfile()
log_appender(appender_console)
log_appender(appender_file(t), index = 2)
log_info(42)
readLines(t)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.