logging: Logging in colorSpec package

Description Details See Also Examples

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.

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:

%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

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


Search within the colorSpec package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.