Gateau User Manual
Atmospheric simulation of astronomical signals
gateau.custom_logger.CustomFormatter Class Reference

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

Inheritance diagram for gateau.custom_logger.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 gateau.custom_logger.CustomFormatter.FORMATS
static
Initial value:
= {
logging.DEBUG: grey + format + reset,
logging.INFO: green + format + reset,
logging.WARNING: yellow + format + reset,
logging.ERROR: red + format + reset,
logging.CRITICAL: bold_red + format + reset
}

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