|
QXmpp Version: 1.15.1
|
The QXmppLogger class represents a sink for logging messages. More...
#include <QXmppLogger.h>
Inherits QObject.
Public Types | |
| enum | LoggingType { NoLogging = 0 , FileLogging = 1 , StdoutLogging = 2 , SignalLogging = 4 } |
| This enum describes how log message are handled. More... | |
| enum | MessageType { NoMessage = 0 , DebugMessage = 1 , InformationMessage = 2 , WarningMessage = 4 , ReceivedMessage = 8 , SentMessage = 16 , AnyMessage = 31 } |
| This enum describes a type of log message. More... | |
Public Member Functions | |
| QXmppLogger (QObject *parent=nullptr) | |
| QXmppLogger::LoggingType | loggingType () |
| Returns the handler for logging messages. | |
| void | setLoggingType (QXmppLogger::LoggingType type) |
| Sets the handler for logging messages. | |
| Q_SIGNAL void | loggingTypeChanged () |
| QString | logFilePath () |
| void | setLogFilePath (const QString &path) |
| Q_SIGNAL void | logFilePathChanged () |
| QXmppLogger::MessageTypes | messageTypes () |
| Returns the types of messages to log. | |
| void | setMessageTypes (QXmppLogger::MessageTypes types) |
| Sets the types of messages to log. | |
| Q_SIGNAL void | messageTypesChanged () |
| virtual Q_SLOT void | setGauge (const QString &gauge, double value) |
| virtual Q_SLOT void | updateCounter (const QString &counter, qint64 amount) |
| Q_SLOT void | log (QXmppLogger::MessageType type, const QString &text) |
| Add a logging message. | |
| Q_SLOT void | reopen () |
| If logging to a file, causes the file to be re-opened. | |
| Q_SIGNAL void | message (QXmppLogger::MessageType type, const QString &text) |
| This signal is emitted whenever a log message is received. | |
Static Public Member Functions | |
| static QXmppLogger * | getLogger () |
Properties | |
| QString | logFilePath |
| The path to which logging messages should be written. | |
| LoggingType | loggingType |
| The handler for logging messages. | |
| MessageTypes | messageTypes |
| The types of messages to log. | |
The QXmppLogger class represents a sink for logging messages.
| QXmppLogger::QXmppLogger | ( | QObject * | parent = nullptr | ) |
Constructs a new QXmppLogger.
| parent |
|
static |
Returns the default logger.
| QString QXmppLogger::logFilePath | ( | ) |
Returns the path to which logging messages should be written.
| QXmppLogger::logFilePathChanged | ( | ) |
Emitted when the log file path has been changed.
| QXmppLogger::loggingTypeChanged | ( | ) |
Emitted when the logging type has been changed.
| QXmppLogger::messageTypesChanged | ( | ) |
Emitted when the message types have been changed.
|
virtual |
Sets the given gauge to value.
NOTE: the base implementation does nothing.
| void QXmppLogger::setLogFilePath | ( | const QString & | path | ) |
|
virtual |
Updates the given counter by amount.
NOTE: the base implementation does nothing.