yieldplotlib.logger#

Logging module.

Attributes#

Classes#

ColorCodes

ANSI escape sequences for colors.

ColorFormatter

Custom formatter to add colors to log messages.

Module Contents#

yieldplotlib.logger.lib_name = 'yieldplotlib'#
yieldplotlib.logger.lib_color = '51'#
class yieldplotlib.logger.ColorCodes[source]#

ANSI escape sequences for colors.

RESET = '\x1b[0m'#
BLACK = '\x1b[30m'#
RED = '\x1b[31m'#
GREEN = '\x1b[32m'#
YELLOW = '\x1b[33m'#
BLUE = '\x1b[34m'#
MAGENTA = '\x1b[35m'#
CYAN = '\x1b[36m'#
WHITE = '\x1b[37m'#
LIB = '\x1b[38;5;51m'#
class yieldplotlib.logger.ColorFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]#

Bases: logging.Formatter

Custom formatter to add colors to log messages.

COLORS: ClassVar[dict[int, str]]#
format(record)[source]#

Format the log message with colors.

Parameters:

record (logging.LogRecord)

yieldplotlib.logger.logger#
yieldplotlib.logger.shell_handler#
yieldplotlib.logger.file_handler#
yieldplotlib.logger.shell_fmt = '%(levelname)s [%(asctime)s] \x1b[0m%(message)s'#
yieldplotlib.logger.file_fmt = '[yieldplotlib] %(levelname)s %(asctime)s [%(filename)s:%(funcName)s:%(lineno)d] %(message)s'#
yieldplotlib.logger.shell_formatter#
yieldplotlib.logger.file_formatter#