Package brisa :: Package core :: Module log :: Class ColoredFormatter
[hide private]
[frames] | no frames]

Class ColoredFormatter

source code

logging.Formatter --+
                    |
                   ColoredFormatter

ColoredFormatter class, which wrappers logging.Formatter.

Instance Methods [hide private]
 
__init__(self, msg, use_color=True)
Constructor of the ColoredFormatter class.
source code
 
format(self, record)
format method to the ColoredFormatter class that organizes the log message.
source code

Inherited from logging.Formatter: formatException, formatTime

Class Variables [hide private]

Inherited from logging.Formatter: converter

Method Details [hide private]

__init__(self, msg, use_color=True)
(Constructor)

source code 

Constructor of the ColoredFormatter class.

Parameters:
  • msg (str) - message to be displayed
  • use_color (boolean) - Flag to indicate the use of color or not
Overrides: logging.Formatter.__init__

format(self, record)

source code 

format method to the ColoredFormatter class that organizes the log message.

Parameters:
  • record (Instance of Logger, either its RootLogger or not) - information about the logger
Overrides: logging.Formatter.format