Skip to content

QtLogger

Base classes

Name Children Inherits
Handler
logging
Handler instances dispatch logging events to specific destinations.
  • Filterer

⋔ Inheritance diagram

graph TD
  1473367688832["debugging.QtLogger"]
  1473227233056["logging.Handler"]
  1473227232080["logging.Filterer"]
  140713234304496["builtins.object"]
  1473227233056 --> 1473367688832
  1473227232080 --> 1473227233056
  140713234304496 --> 1473227232080

🛈 DocStrings

Bases: Handler

Source code in prettyqt\debugging\__init__.py
class QtLogger(logging.Handler):
    def emit(self, record: logging.LogRecord):
        match record.level:
            case logging.DEBUG:
                QtCore.qDebug(self.format(record))
            case logging.INFO:
                QtCore.qInfo(self.format(record))
            case logging.WARNING:
                QtCore.qWarning(self.format(record))
            case logging.CRITICAL:
                QtCore.qCritical(self.format(record))
            case logging.CRITICAL:
                QtCore.qFatal(self.format(record))