QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
QgsServerLogger Class Reference

Writes message log into server logfile. More...

#include <qgsserverlogger.h>

Inheritance diagram for QgsServerLogger:
Inheritance graph
[legend]

Public Slots

void logMessage (const QString &message, const QString &tag, Qgis::MessageLevel level) override
 Log a message from the server context.
 
- Public Slots inherited from QgsMessageLogConsole
virtual void logMessage (const QString &message, const QString &tag, Qgis::MessageLevel level)
 Logs a message to stderr.
 

Public Member Functions

Qgis::MessageLevel logLevel () const
 Gets the current log level.
 
void setLogFile (const QString &filename=QString())
 Set the current log file.
 
void setLogLevel (Qgis::MessageLevel level)
 Set the current log level.
 
void setLogStderr ()
 Activates logging to stderr.
 
- Public Member Functions inherited from QgsMessageLogConsole
 QgsMessageLogConsole ()
 Constructor for QgsMessageLogConsole.
 

Static Public Member Functions

static QgsServerLoggerinstance ()
 Gets the singleton instance.
 

Protected Member Functions

 QgsServerLogger ()
 
- Protected Member Functions inherited from QgsMessageLogConsole
QString formatLogMessage (const QString &message, const QString &tag, Qgis::MessageLevel level=Qgis::MessageLevel::Info) const
 Formats a log message.
 

Detailed Description

Writes message log into server logfile.

Definition at line 34 of file qgsserverlogger.h.

Constructor & Destructor Documentation

◆ QgsServerLogger()

QgsServerLogger::QgsServerLogger ( )
protected

Definition at line 32 of file qgsserverlogger.cpp.

Member Function Documentation

◆ instance()

QgsServerLogger * QgsServerLogger::instance ( )
static

Gets the singleton instance.

Definition at line 23 of file qgsserverlogger.cpp.

◆ logLevel()

Qgis::MessageLevel QgsServerLogger::logLevel ( ) const
inline

Gets the current log level.

Returns
the log level

Definition at line 48 of file qgsserverlogger.h.

◆ logMessage

void QgsServerLogger::logMessage ( const QString &  message,
const QString &  tag,
Qgis::MessageLevel  level 
)
overrideslot

Log a message from the server context.

Parameters
messagethe message
tagtag of the message
levellog level of the message

Definition at line 37 of file qgsserverlogger.cpp.

◆ setLogFile()

void QgsServerLogger::setLogFile ( const QString &  filename = QString())

Set the current log file.

Definition at line 60 of file qgsserverlogger.cpp.

◆ setLogLevel()

void QgsServerLogger::setLogLevel ( Qgis::MessageLevel  level)

Set the current log level.

Parameters
levelthe log level

Definition at line 55 of file qgsserverlogger.cpp.

◆ setLogStderr()

void QgsServerLogger::setLogStderr ( )

Activates logging to stderr.

Since
QGIS 3.4

Definition at line 72 of file qgsserverlogger.cpp.


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