logger | R Documentation |
This is the main interface for configuring logging behaviour. We adopt the well-known log4j etymology: Appenders are destinations (e.g. the console or a file) where logs are written, and the Layout is the format of these logs.
logger(threshold = "INFO", appenders = console_appender())
threshold |
The logging threshold, one of |
appenders |
The logging appenders; both single appenders and a |
An object of class "logger"
.
Appenders and Layouts for information on controlling the behaviour of the logger object.
# By default, logs are written to the console at the "INFO" threshold.
logger <- logger()
log_info(logger, "Located nearest gas station.")
log_warn(logger, "Ez-Gas sensor network is not available.")
log_debug(logger, "Debug messages are suppressed by default.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.