layoutTimestamp {ParallelLogger}R Documentation

Logging layout with timestamp

Description

A layout function to be used with an appender. This layout adds the time to the message.

Usage

layoutTimestamp(level, message)

Arguments

level

The level of the message (e.g. "INFO")

message

The message to layout.

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")                       
unregisterLogger("SIMPLE")                     

[Package ParallelLogger version 3.3.0 Index]