QXmpp: QXmppLogger Class Reference

QXmpp Version:0.7.5

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Functions Variables Enumerations Enumerator Properties Groups
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
QXmppLogger Class Reference
Core

The QXmppLogger class represents a sink for logging messages. More...

`#include <QXmppLogger.h>`

## 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 Slots
virtual void | setGauge (const QString &gauge, double value)
virtual void | updateCounter (const QString &counter, qint64 amount)
void | log (QXmppLogger::MessageType type, const QString &text)
void | reopen ()

## Signals
void | message (QXmppLogger::MessageType type, const QString &text)
| This signal is emitted whenever a log message is received.

## Public Member Functions
| QXmppLogger (QObject *parent=0)
QXmppLogger::LoggingType | loggingType ()
void | setLoggingType (QXmppLogger::LoggingType type)
QString | logFilePath ()
void | setLogFilePath (const QString &path)
QXmppLogger::MessageTypes | messageTypes ()
void | setMessageTypes (QXmppLogger::MessageTypes types)

## Static Public Member Functions
static QXmppLogger * | getLogger ()

## Properties
QString | logFilePath
LoggingType | loggingType
MessageTypes | messageTypes

## Detailed Description

The QXmppLogger class represents a sink for logging messages.

## Member Enumeration Documentation

enum QXmppLogger::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.

enum QXmppLogger::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.

## Constructor & Destructor Documentation

QXmppLogger::QXmppLogger | ( | QObject * | parent = `0` | ) |

Constructs a new QXmppLogger.

Parameters

  parent |

## Member Function Documentation

QXmppLogger * QXmppLogger::getLogger | ( |  | ) |
| static

Returns the default logger.

void QXmppLogger::log | ( | QXmppLogger::MessageType | type,
|  | const QString & | text
| ) |  |
| slot

Add a logging message.

Parameters

  type |
  text |

void QXmppLogger::reopen | ( |  | ) |
| slot

If logging to a file, causes the file to be re-opened.

void QXmppLogger::setGauge | ( | const QString & | gauge,
|  | double | value
| ) |  |
| virtualslot

Sets the given gauge to value.

NOTE: the base implementation does nothing.

void QXmppLogger::setLogFilePath | ( | const QString & | path | ) |

Sets the path to which logging messages should be written.

Parameters

  path |

See Also
  setLoggingType()

void QXmppLogger::setLoggingType | ( | QXmppLogger::LoggingType | type | ) |

Sets the handler for logging messages.

Parameters

  type |

void QXmppLogger::setMessageTypes | ( | QXmppLogger::MessageTypes | types | ) |

Sets the types of messages to log.

Parameters

  types |

void QXmppLogger::updateCounter | ( | const QString & | counter,
|  | qint64 | amount
| ) |  |
| virtualslot

Updates the given counter by amount.

NOTE: the base implementation does nothing.

## Property Documentation

QString QXmppLogger::logFilePath
| readwrite

Returns the path to which logging messages should be written.

See Also
  loggingType()

QXmppLogger::LoggingType QXmppLogger::loggingType
| readwrite

Returns the handler for logging messages.

QXmppLogger::MessageTypes QXmppLogger::messageTypes
| readwrite

Returns the types of messages to log.

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

- QXmppLogger.h
- QXmppLogger.cpp