Version: 9.12.0
KERNEL_PY.kernel.logger.ExtLogger Class Reference

This class extends Logger class and adds exception information when DEBUG messages are recorded. More...

Inheritance diagram for KERNEL_PY.kernel.logger.ExtLogger:

Public Member Functions

def __init__ (self, keyword="KEY", level=salome.kernel.logconfig.loggingLevel, color=None, sourceFileName=None)
 
def debug (self, message)
 Log a DEBUG message with exception information (equivalent to Logger.debug(message, exc_info = True) ). More...
 
def showDebug (self)
 Log all messages, including DEBUG level messages (equivalent to setLevel(logging.DEBUG)). More...
 
def setLogFile (self, logFilename)
 Define a log file to record the log messages (in addition to the standard output). More...
 
def setColor (self, color)
 Set the color of log messages on color-capable terminals. More...
 
def closeLogFile (self)
 Close the log file. More...
 
def hideDebug (self)
 Hide DEBUG level messages (equivalent to setLevel(logging.INFO)). More...
 

Private Attributes

 _baseFormatString
 
 _baseFormatter
 
 _stdoutStream
 
 _stdoutHandler
 
 _fileHandler
 

Detailed Description

This class extends Logger class and adds exception information when DEBUG messages are recorded.

It exists mainly for backward compatibility, as the same thing can be done by calling Logger.debug(message, exc_info = True) .

This class extends :class:`Logger` class and adds exception information
when DEBUG messages are recorded. It exists mainly for backward
compatibility, as the same thing can be done by calling
``Logger.debug(message, exc_info = True)``.

Constructor & Destructor Documentation

◆ __init__()

def KERNEL_PY.kernel.logger.ExtLogger.__init__ (   self,
  keyword = "KEY",
  level = salome.kernel.logconfig.loggingLevel,
  color = None,
  sourceFileName = None 
)

Member Function Documentation

◆ closeLogFile()

def KERNEL_PY.kernel.logger.Logger.closeLogFile (   self)
inherited

◆ debug()

def KERNEL_PY.kernel.logger.ExtLogger.debug (   self,
  message 
)

Log a DEBUG message with exception information (equivalent to Logger.debug(message, exc_info = True) ).

Log a DEBUG message with exception information (equivalent to
``Logger.debug(message, exc_info = True)``).

References KERNEL_PY.kernel.logger.TEST_Logger().

Referenced by KERNEL_PY.kernel.logger.ExtLogger.__init__().

◆ hideDebug()

def KERNEL_PY.kernel.logger.Logger.hideDebug (   self)
inherited

Hide DEBUG level messages (equivalent to setLevel(logging.INFO)).

Hide DEBUG level messages (equivalent to ``setLevel(logging.INFO)``).

◆ setColor()

def KERNEL_PY.kernel.logger.Logger.setColor (   self,
  color 
)
inherited

Set the color of log messages on color-capable terminals.

If color is None, the default color will be used.

Set the color of log messages on color-capable terminals. If `color`
is :const:`None`, the default color will be used.

References logger.Logger._baseFormatString, KERNEL_PY.kernel.logger.Logger._baseFormatString, logger.Logger._baseFormatter, KERNEL_PY.kernel.logger.Logger._baseFormatter, logger.Logger._stdoutHandler, KERNEL_PY.kernel.logger.Logger._stdoutHandler, logger.Logger._stdoutStream, KERNEL_PY.kernel.logger.Logger._stdoutStream, termcolor.canDisplayColor(), and termcolor.getControlSequence().

◆ setLogFile()

def KERNEL_PY.kernel.logger.Logger.setLogFile (   self,
  logFilename 
)
inherited

Define a log file to record the log messages (in addition to the standard output).

Define a log file to record the log messages (in addition to the
standard output).

References logger.Logger._baseFormatter, KERNEL_PY.kernel.logger.Logger._baseFormatter, logger.Logger._fileHandler, KERNEL_PY.kernel.logger.Logger._fileHandler, logger.Logger.closeLogFile(), and KERNEL_PY.kernel.logger.Logger.closeLogFile().

◆ showDebug()

def KERNEL_PY.kernel.logger.Logger.showDebug (   self)
inherited

Log all messages, including DEBUG level messages (equivalent to setLevel(logging.DEBUG)).

Log all messages, including DEBUG level messages (equivalent to
``setLevel(logging.DEBUG)``).

Field Documentation

◆ _baseFormatString

KERNEL_PY.kernel.logger.Logger._baseFormatString
privateinherited

◆ _baseFormatter

KERNEL_PY.kernel.logger.Logger._baseFormatter
privateinherited

◆ _fileHandler

◆ _stdoutHandler

KERNEL_PY.kernel.logger.Logger._stdoutHandler
privateinherited

◆ _stdoutStream

KERNEL_PY.kernel.logger.Logger._stdoutStream
privateinherited