perun.logging

Logging utilities.

Attributes

Classes

ColoredFormatter

A logging formatter that adds colors to specific parts of the log message.

Functions

set_logger_config(→ None)

Configure the logging settings for the application.

Module Contents

perun.logging.RESET_SEQ = '\x1b[0m'
perun.logging.COLOR_SEQ = '\x1b[1;%dm'
perun.logging.COLORS
class perun.logging.ColoredFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]

Bases: logging.Formatter

A logging formatter that adds colors to specific parts of the log message.

format(record: logging.LogRecord) str[source]

Apply color formating to log message.

perun.logging.set_logger_config(config: configparser.ConfigParser) None[source]

Configure the logging settings for the application.

Parameters:

config (ConfigParser) – Configuration object.

Return type:

None