OpenQuizz
Une application de gestion des contenus pédagogiques
LogFormatter Class Reference
Inheritance diagram for LogFormatter:
Collaboration diagram for LogFormatter:

Public Member Functions

def __init__ (self, color=True, datefmt=None)
 
def formatMessage (self, record)
 

Data Fields

 termwidth
 

Static Public Attributes

 DEFAULT_COLORS
 

Detailed Description

Log formatter with colour support

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  color = True,
  datefmt = None 
)
:arg bool color: Enables color support.
:arg string fmt: Log message format.
It will be applied to the attributes dict of log records. The
text between ``%(color)s`` and ``%(end_color)s`` will be colored
depending on the level if color support is on.
:arg dict colors: color mappings from logging level to terminal color
code
:arg string datefmt: Datetime format.
Used for formatting ``(asctime)`` placeholder in ``prefix_fmt``.
.. versionchanged:: 3.2
Added ``fmt`` and ``datefmt`` arguments.

Member Function Documentation

◆ formatMessage()

def formatMessage (   self,
  record 
)

Field Documentation

◆ DEFAULT_COLORS

DEFAULT_COLORS
static

◆ termwidth

termwidth

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