logging: Logging in colorSpec package

Description Details See Also Examples


There is some flexibility in the colorSpec logging level and format. Logging output goes to stderr(), just like the message stream; but see sink (and the pitfalls of using it).


The levels are: "FATAL", "ERROR", "WARN", "INFO", "DEBUG", and "TRACE" - the usual ones from Log4J. The initial level is "WARN".
If the option stoponerror is TRUE (the default), a log event with level "ERROR" stops execution; otherwise, execution keeps going.
A "FATAL" log event (e.g. internal error), always stops execution.

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, stderr


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

colorSpec documentation built on Dec. 4, 2017, 9:03 a.m.