cross_bones.logging¶
Attributes¶
Classes¶
A custom logger formatter |
Module Contents¶
- class cross_bones.logging.CustomFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)¶
Bases:
logging.FormatterA custom logger formatter
- format(record: logging.LogRecord) str¶
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.
- blue = '\x1b[34;20m'¶
- bold_red = '\x1b[31;1m'¶
- format_str = '%(module)s - %(funcName)s: %(message)s'¶
- green = '\x1b[32;20m'¶
- grey = '\x1b[38;20m'¶
- red = '\x1b[31;20m'¶
- reset = '\x1b[0m'¶
- yellow = '\x1b[33;20m'¶
- cross_bones.logging.formatter¶
- cross_bones.logging.handler¶
- cross_bones.logging.logger¶