Class: QgsMessageLogConsole

class qgis.core.QgsMessageLogConsole

Bases: PyQt5.QtCore.QObject

Default implementation of message logging interface

This class outputs log messages to the standard error. Therefore it might be the right choice for applications without GUI.

QgsMessageLogConsole() Constructor for QgsMessageLogConsole.

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
formatLogMessage(self, message: str, tag: str, level: Qgis.MessageLevel = Qgis.Info)str

Formats a log message. Used by child classes.

Parameters
  • message (str) – the message to format

  • tag (str) – the tag of the message

  • level (Qgis.MessageLevel = Qgis.Info) – the log level of the message

New in version 3.4.

Return type

str

isSignalConnected(self, QMetaMethod)bool
logMessage(self, message: str, tag: str, level: Qgis.MessageLevel)

Logs a message to stderr.

Parameters
  • message (str) – the message to format

  • tag (str) – the tag of the message

  • level (Qgis.MessageLevel) – the log level of the message

receivers(self, PYQT_SIGNAL)int
sender(self)QObject
senderSignalIndex(self)int
timerEvent(self, QTimerEvent)