BmnRoot
Loading...
Searching...
No Matches
function_set.CustomFormatter Class Reference
Inheritance diagram for function_set.CustomFormatter:
[legend]
Collaboration diagram for function_set.CustomFormatter:
[legend]

Public Member Functions

 format (self, record)
 
 format (self, record)
 

Static Public Attributes

str grey = "\x1b[38;20m"
 
str yellow = "\x1b[33;93m"
 
str red = "\x1b[33;91m"
 
str bold_red = "\x1b[31;1m"
 
str reset = "\x1b[0m"
 
str format = '%(asctime)s %(levelname)s: %(message)s'
 
str datefmt = '%Y-%m-%d %H:%M:%S',
 
dict FORMATS
 

Detailed Description

 Class for colouring output messages

Definition at line 24 of file function_set.py.

Member Function Documentation

◆ format() [1/2]

function_set.CustomFormatter.format (   self,
  record 
)

Definition at line 40 of file function_set.py.

References function_set.CustomFormatter.FORMATS.

◆ format() [2/2]

function_set.CustomFormatter.format (   self,
  record 
)

Definition at line 40 of file function_set.py.

References function_set.CustomFormatter.FORMATS.

Member Data Documentation

◆ bold_red

str function_set.CustomFormatter.bold_red = "\x1b[31;1m"
static

Definition at line 29 of file function_set.py.

◆ datefmt

str function_set.CustomFormatter.datefmt = '%Y-%m-%d %H:%M:%S',
static

Definition at line 32 of file function_set.py.

◆ format

str function_set.CustomFormatter.format = '%(asctime)s %(levelname)s: %(message)s'
static

Definition at line 31 of file function_set.py.

◆ FORMATS

dict function_set.CustomFormatter.FORMATS
static
Initial value:
= {
logging.DEBUG: grey + format + reset,
logging.INFO: format,
logging.WARNING: yellow + format + reset,
logging.ERROR: red + format + reset,
logging.CRITICAL: bold_red + format + reset
}

Definition at line 33 of file function_set.py.

Referenced by function_set.CustomFormatter.format().

◆ grey

str function_set.CustomFormatter.grey = "\x1b[38;20m"
static

Definition at line 26 of file function_set.py.

◆ red

str function_set.CustomFormatter.red = "\x1b[33;91m"
static

Definition at line 28 of file function_set.py.

◆ reset

str function_set.CustomFormatter.reset = "\x1b[0m"
static

Definition at line 30 of file function_set.py.

◆ yellow

str function_set.CustomFormatter.yellow = "\x1b[33;93m"
static

Definition at line 27 of file function_set.py.


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