createConsoleAppender: Create console appender

Description Usage Arguments Details Examples

View source: R/Appenders.R

Description

Create console appender

Usage

1

Arguments

layout

The layout to be used by the appender.

Details

Creates an appender that will write to the console.

Examples

1
2
3
4
5
6
7
8
9
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")                     

Example output

Hello world
2021-01-19 22:45:50	Hello world
[1] TRUE

ParallelLogger documentation built on July 16, 2021, 9:07 a.m.