mcsas.log.widgethandler module¶
-
class
WidgetHandler(widget)[source]¶ Bases:
logging.HandlerA logging.Handler which appends messages to some widget.append().
>>> import logging >>> from PyQt4.QtGui import QPlainTextEdit >>> from utilsgui import DialogInteraction >>> from logdock import LogHandler >>> pte = DialogInteraction.instance(QPlainTextEdit) >>> handler = LogHandler(pte) >>> msg = "testest" >>> handler.emit(logging.LogRecord("", 0, "", 0, msg, (), None)) >>> str(pte.toPlainText()) == msg True
-
emit(record)[source]¶ Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
-
widget¶
-