ID EN
Logging

getLoggerClass

Python 3.11

Return either the standard Logger class, or the last class passed to setLoggerClass(). This function may be called from within a new class definition, to ensure that installing a customized Logger class will not undo customizations already applied by other code. For example:

Syntax

PYTHON
logging.getLoggerClass()

Examples

Example 1
PYTHON
class MyLogger(logging.getLoggerClass()):
     ... override behaviour here

See Also

Logger setLoggerClass() Logger