execlib.util.generic module¶
- class execlib.util.generic.ColorFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]¶
Bases:
Formatter
- DEFAULT_LOGGER = <logging.Formatter object>¶
- FORMATS = {'handler': <logging.Formatter object>, 'listener': <logging.Formatter object>, 'router': <logging.Formatter object>, 'server': <logging.Formatter object>, 'site': <logging.Formatter object>, 'utils': <logging.Formatter object>, 'x': <logging.Formatter object>}¶
- format(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 execlib.util.generic.TqdmLoggingHandler(level=0)[source]¶
Bases:
StreamHandler
- emit(record)[source]¶
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.