registerLogger: Register a logger

Description Usage Arguments Details Examples

View source: R/Logging.R

Description

Register a logger

Usage

1

Arguments

logger

An object of type Logger as created using the createLogger function.

Details

Registers a logger as created using the createLogger function to the logging system.

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.