mads.log

log module to set standard format of logging.

ERASE_LINE = '\x1b[2K'
class Formatter(fmt=None, datefmt=None, style='%')[source]

Bases: logging.Formatter

Initialize the formatter with specified format strings.

Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument (if omitted, you get the ISO8601 format).

Use a style parameter of ‘%’, ‘{‘ or ‘$’ to specify that you want to use one of %-formatting, str.format() ({}) formatting or string.Template formatting in your format string.

Changed in version 3.2: Added the style parameter.

format(record)[source]
class FormatterClean(fmt=None, datefmt=None, style='%')[source]

Bases: logging.Formatter

Initialize the formatter with specified format strings.

Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument (if omitted, you get the ISO8601 format).

Use a style parameter of ‘%’, ‘{‘ or ‘$’ to specify that you want to use one of %-formatting, str.format() ({}) formatting or string.Template formatting in your format string.

Changed in version 3.2: Added the style parameter.

format(record)[source]
datefmt = '%H:%M:%S'
homedir = '/home/bart'
log(level, error)[source]
loglevel(loglevel='error', colors=False)[source]