minitrino.core.logging.formatter module#

Logging formatter for Minitrino logger.

class minitrino.core.logging.formatter.MinitrinoLogFormatter(always_verbose=False)[source][source]#

Bases: Formatter

Formatter for Minitrino logs.

Initialize the formatter.

COLORS = {'CRITICAL': 'red', 'DEBUG': 'magenta', 'ERROR': 'red', 'INFO': 'cyan', 'WARNING': 'yellow'}[source]#
PREFIXES = {'CRITICAL': '[e]  ', 'DEBUG': '[v]  ', 'ERROR': '[e]  ', 'INFO': '[i]  ', 'WARNING': '[w]  '}[source]#
format(record: LogRecord) str[source][source]#

Format a log record for output.

Parameters:

record (logging.LogRecord) – The log record to format.

Returns:

The formatted log message.

Return type:

str