Utilities for logging output from Omicron in python
-
class
xpipeline.setuputils.log.
ColoredFormatter
(msg, use_color=True, **kwargs)[source]¶ Bases:
logging.Formatter
A ~logging.Formatter that supports coloured output
-
format
(self, record)[source]¶ Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
-
-
class
xpipeline.setuputils.log.
Logger
(name, level=10)[source]¶ Bases:
logging.Logger
~logging.Logger with a nice format
-
FORMAT
= '[\x1b[1m%(name)s\x1b[0m %(gpstime)d] %(levelname)+19s: %(message)s'¶
-