msl.qt.widgets.logger module

A QWidget to display logging messages.

class msl.qt.widgets.logger.Logger(*, level=20, fmt='%(asctime)s [%(levelname)s] -- %(name)s -- %(message)s', datefmt=None, logger=None, parent=None)[source]

Bases: Handler, QWidget

A QWidget to display logging messages.



To view an example of the Logger widget run:

>>> from msl.examples.qt import logger  
property records

The history of all the log records.


list of LogRecord

save(path, *, level=20)[source]

Save log records to a file.

  • path (str) – The path to save the log records to. Appends the records to the file if the file already exists, otherwise creates a new log file. It is recommended that the file extension be .log, but not mandatory.

  • level (int, optional) – All LogRecord’s with a Logging Level >= level will be saved.