Create console appender

createConsoleAppender(layout = layoutSimple)

Arguments

layout

The layout to be used by the appender.

Details

Creates an appender that will write to the console.

Examples

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")                       
#> Hello world
#> 2024-08-23 08:25:53	Hello world
unregisterLogger("SIMPLE")                     
#> [1] TRUE