27 QgsDebugMsg( QStringLiteral(
"%1 %2[%3] %4" ).arg( QDateTime::currentDateTime().toString( Qt::ISODate ), tag ).arg( level ).arg( message ) );
32 void QgsMessageLog::emitMessage(
const QString &message,
const QString &tag,
Qgis::MessageLevel level,
bool notifyUser )
35 if ( level !=
Qgis::Info && notifyUser && mAdviseBlockCount == 0 )
51 << tag.toLocal8Bit().data() <<
"[" <<
55 <<
"]: " << message.toLocal8Bit().data() << std::endl;
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc.
void messageReceived(const QString &message, const QString &tag, Qgis::MessageLevel level)
Emitted whenever the log receives a message.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
static QgsMessageLog * messageLog()
Returns the application's message log.
void logMessage(const QString &message, const QString &tag, Qgis::MessageLevel level)
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Default implementation of message logging interface.
~QgsMessageLogNotifyBlocker()
QgsMessageLogNotifyBlocker()
Constructor for QgsMessageLogNotifyBlocker.
Interface for logging messages from QGIS in GUI independent way.