createLogger | R Documentation |
Create a logger
createLogger(
name = "SIMPLE",
threshold = "INFO",
appenders = list(createConsoleAppender())
)
name |
A name for the logger. |
threshold |
The threshold to be used for reporting. |
appenders |
A list of one or more appenders as created for example using the
|
Creates a logger that will log messages to its appenders. The logger will only log messages at a level equal to or higher than its threshold. For example, if the threshold is "INFO" then messages marked "INFO" will be logged, but messages marked "TRACE" will not. The order of levels is "TRACE", "DEBUG", "INFO", "WARN", "ERROR, "and FATAL".
An object of type Logger
, to be used with the registerLogger
function.
appender <- createConsoleAppender(layout = layoutTimestamp)
logger <- createLogger(name = "SIMPLE",
threshold = "INFO",
appenders = list(appender))
registerLogger(logger)
logTrace("This event is below the threshold (INFO)")
logInfo("Hello world")
unregisterLogger("SIMPLE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.