Learn R Programming

colorSpec (version 0.5-2)

logging: Logging in colorSpec package

Description

There is some flexibility in the colorSpec logging level and format. There is no flexibility in the output, it all goes to the console using cat and print, but see sink.

Arguments

Details

loglevel The levels are: "FATAL", "ERROR", "WARN", "INFO", "DEBUG", and "TRACE" - the usual ones from Log4J. The initial level is "WARN". A log event with level "ERROR" stops execution if the option stoponerror is TRUE. A "FATAL" log event (e.g. internal error), always stops execution. logformat The format is given by a string with standard Log4J conversion specifications: lll{ %t the date/time of the logging event. %t can be followed by standard strftime specs in braces; see example. %l the level of the logging event %n namespace where event occurred %f function where event occurred %m the message itself }

See Also

cs.options, sink

Examples

Run this code
cs.options( logformat="%t{%H:%M:%OS3} %l %n::%f(). %m" )

Run the code above in your browser using DataLab