QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
38 if ( mLogLevel > level )
42 if ( mLogFile.isOpen() )
45 mTextStream << formattedMessage;
48 else if ( mLogStderr )
63 mLogFile.setFileName( filename );
65 if ( ( ! filename.isEmpty() ) && mLogFile.open( QIODevice::Append ) )
67 mTextStream.setDevice( &mLogFile );
QString formatLogMessage(const QString &message, const QString &tag, Qgis::MessageLevel level=Qgis::MessageLevel::Info) const
Formats a log message.
Writes message log into server logfile.
void setLogLevel(Qgis::MessageLevel level)
Set the current log level.
void logMessage(const QString &message, const QString &tag, Qgis::MessageLevel level) override
Log a message from the server context.
static QgsServerLogger * instance()
Gets the singleton instance.
virtual void logMessage(const QString &message, const QString &tag, Qgis::MessageLevel level)
Logs a message to stderr.
void setLogFile(const QString &filename=QString())
Set the current log file.
void setLogStderr()
Activates logging to stderr.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Default implementation of message logging interface.