QGIS API Documentation  2.99.0-Master (19b062c)
Public Types | Signals | Public Member Functions | Static Public Member Functions | List of all members
QgsMessageLog Class Reference

Interface for logging messages from QGIS in GUI independent way. More...

#include <qgsmessagelog.h>

Inheritance diagram for QgsMessageLog:
Inheritance graph

Public Types

enum  MessageLevel {
  ALL = 0, INFO = 0, WARNING = 1, CRITICAL = 2,
  NONE = 3


void messageReceived (const QString &message, const QString &tag, QgsMessageLog::MessageLevel level)
void messageReceived (bool received)

Public Member Functions

 QgsMessageLog ()=default
 Constructor for QgsMessageLog. More...
 Q_ENUM (MessageLevel)

Static Public Member Functions

static void logMessage (const QString &message, const QString &tag=QString(), MessageLevel level=QgsMessageLog::WARNING)
 add a message to the instance (and create it if necessary) More...

Detailed Description

Interface for logging messages from QGIS in GUI independent way.

This class provides abstraction of a tabbed window for showing messages to the user. By default QgsMessageLogOutput will be used if not overridden with another message log creator function.

QGIS application uses QgsMessageLog class for logging messages in a dockable window for the user.

QgsMessageLog is not usually directly created, but rather accessed through QgsApplication::messageLog().

Definition at line 37 of file qgsmessagelog.h.

Member Enumeration Documentation

◆ MessageLevel


Definition at line 43 of file qgsmessagelog.h.

Constructor & Destructor Documentation

◆ QgsMessageLog()

QgsMessageLog::QgsMessageLog ( )

Constructor for QgsMessageLog.

Member Function Documentation

◆ logMessage()

void QgsMessageLog::logMessage ( const QString &  message,
const QString &  tag = QString(),
QgsMessageLog::MessageLevel  level = QgsMessageLog::WARNING 

add a message to the instance (and create it if necessary)

Definition at line 25 of file qgsmessagelog.cpp.

◆ messageReceived [1/2]

void QgsMessageLog::messageReceived ( const QString &  message,
const QString &  tag,
QgsMessageLog::MessageLevel  level 

◆ messageReceived [2/2]

void QgsMessageLog::messageReceived ( bool  received)

◆ Q_ENUM()

QgsMessageLog::Q_ENUM ( MessageLevel  )

The documentation for this class was generated from the following files: