vdat.gui.logger_widget – Logging widget

Logging handlers

class vdat.gui.logger_widget.TextWindowHandler(browser, parent=None)[source]

Bases: PyQt5.QtCore.QObject, logging.Handler

This is an implementation of a logging Handler that prints log messages to a QTextEdit widget

Custom signals
Name Signature Description
postText string emit the signal with the text to submit
Custom slot
Name Signature Description
post_to_panel() string append the incoming message to textBrowser
Connections between custom signals and/or slots.
Signal Slot
postText post_to_panel()
Parameters:
browser : PyQt5.QtWidgets.QTextEdit

A text edit widget to write the information to

parent : qobject, optional

parent of the QObject used to create the logger

Attributes:
textBrowser : PyQt5.QtWidgets.QTextEdit

text widget where the log message is posted

postText
emit(record)[source]

Construct a string in HTML out of the record, and emit a signal that tells another function to update the text browser

Parameters:
record : logging.LogRecord

a record from a logger

post_to_panel(msg)[source]

Update the text window in the GUI by appending msg.

This method is also a PyQt slot.

Parameters:
msg : String

A message to post to the test browser window

class vdat.gui.logger_widget.LoggerWidget(parent=None)[source]

Bases: PyQt5.QtWidgets.QTextEdit

Widget where the logging messages are shown