Skip to content

log_formatter

Module for the custom logging formatter.

ANSIColors

Bases: Enum

ANSI Codes for text coloring.

A coloring code turns any text following it into the respective color, to return to normal formatting the reset code is required.

RESET class-attribute instance-attribute

RESET = '\x1b[0m'

Reset all text formatting.

LoggingFormatter

Bases: Formatter

Basic logging formatter with more information and coloring.

format

format(record: LogRecord) -> str

Create and set the actual formatter and format.