flint.logging

Attributes

Classes

CustomFormatter

A custom logger formatter

Module Contents

class flint.logging.CustomFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]

Bases: logging.Formatter

A custom logger formatter

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.

FORMATS[source]
blue = '\x1b[34;20m'[source]
bold_red = '\x1b[31;1m'[source]
format_str = '%(asctime)s.%(msecs)03d %(module)s - %(funcName)s: %(message)s'[source]
green = '\x1b[32;20m'[source]
grey = '\x1b[38;20m'[source]
red = '\x1b[31;20m'[source]
reset = '\x1b[0m'[source]
yellow = '\x1b[33;20m'[source]
flint.logging.ch[source]
flint.logging.logger[source]