The QXmppLogger class represents a sink for logging messages.
More...
#include <QXmppLogger.h>
Inherits QObject.
|
virtual void | setGauge (const QString &gauge, double value) |
|
virtual void | updateCounter (const QString &counter, qint64 amount) |
|
void | log (QXmppLogger::MessageType type, const QString &text) |
| Add a logging message.
|
|
void | reopen () |
| If logging to a file, causes the file to be re-opened.
|
|
|
void | message (QXmppLogger::MessageType type, const QString &text) |
| This signal is emitted whenever a log message is received.
|
|
|
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.
◆ LoggingType
This enum describes how log message are handled.
Enumerator |
---|
NoLogging | Log messages are discarded.
|
FileLogging | Log messages are written to a file.
|
StdoutLogging | Log messages are written to the standard output.
|
SignalLogging | Log messages are emitted as a signal.
|
◆ MessageType
This enum describes a type of log message.
Enumerator |
---|
NoMessage | No message type.
|
DebugMessage | Debugging message.
|
InformationMessage | Informational message.
|
WarningMessage | Warning message.
|
ReceivedMessage | Message received from server.
|
SentMessage | Message sent to server.
|
AnyMessage | Any message type.
|
◆ QXmppLogger()
QXmppLogger::QXmppLogger |
( |
QObject * |
parent = nullptr | ) |
|
◆ getLogger()
Returns the default logger.
◆ logFilePath()
QString QXmppLogger::logFilePath |
( |
| ) |
|
Returns the path to which logging messages should be written.
- See also
- loggingType()
◆ logFilePathChanged()
QXmppLogger::logFilePathChanged |
( |
| ) |
|
Emitted when the log file path has been changed.
- Since
- QXmpp 1.7
◆ loggingTypeChanged()
QXmppLogger::loggingTypeChanged |
( |
| ) |
|
Emitted when the logging type has been changed.
- Since
- QXmpp 1.7
◆ messageTypesChanged()
QXmppLogger::messageTypesChanged |
( |
| ) |
|
Emitted when the message types have been changed.
- Since
- QXmpp 1.7
◆ setGauge
void QXmppLogger::setGauge |
( |
const QString & |
gauge, |
|
|
double |
value |
|
) |
| |
|
virtualslot |
Sets the given gauge to value.
NOTE: the base implementation does nothing.
◆ setLogFilePath()
void QXmppLogger::setLogFilePath |
( |
const QString & |
path | ) |
|
Sets the path to which logging messages should be written.
- Parameters
-
- See also
- setLoggingType()
◆ updateCounter
void QXmppLogger::updateCounter |
( |
const QString & |
counter, |
|
|
qint64 |
amount |
|
) |
| |
|
virtualslot |
Updates the given counter by amount.
NOTE: the base implementation does nothing.
The documentation for this class was generated from the following files: