PyPO User Manual
PyPO.CustomLogger.CustomFormatter Class Reference

Class for formatting of the logging from the terminal. More...

Inheritance diagram for PyPO.CustomLogger.CustomFormatter:

Public Member Functions

def format (self, record)
 

Static Public Attributes

string grey = "\x1b[38;20m"
 
string green = "\x1b[32;20m"
 
string yellow = "\x1b[33;1m"
 
string blue = "\x1b[34;1m"
 
string purple = "\x1b[35;1m"
 
string red = "\x1b[31;20m"
 
string bold_red = "\x1b[31;1m"
 
string reset = "\x1b[0m"
 
string format = "%(asctime)s - %(levelname)s - %(message)s "
 
dictionary FORMATS
 

Detailed Description

Class for formatting of the logging from the terminal.

Logger records date, timestamp and type of level. Has custom colors for different logging levels.

Member Data Documentation

◆ FORMATS

dictionary PyPO.CustomLogger.CustomFormatter.FORMATS
static
Initial value:
= {
logging.DEBUG: grey + format + reset,
logging.INFO: green + format + reset,
logging.WORK: blue + format + reset,
logging.RESULT: purple + format + reset,
logging.WARNING: yellow + format + reset,
logging.ERROR: bold_red + format + reset,
logging.CRITICAL: bold_red + format + reset
}

The documentation for this class was generated from the following file: