aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppLogger.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-03-08 20:08:05 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-03-08 20:08:05 +0000
commitfad04899470294d98233cfc27c6c18f82990c7ac (patch)
treeac13c50c6261310e3a0b66435614bd7c3235e453 /source/QXmppLogger.h
parentd1765ee554d21cb947eed3fbf1aa9073ff962443 (diff)
downloadqxmpp-fad04899470294d98233cfc27c6c18f82990c7ac.tar.gz
rework QXmppLogger yet again
Diffstat (limited to 'source/QXmppLogger.h')
-rw-r--r--source/QXmppLogger.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/QXmppLogger.h b/source/QXmppLogger.h
index 271dd389..56ee35a6 100644
--- a/source/QXmppLogger.h
+++ b/source/QXmppLogger.h
@@ -26,8 +26,7 @@
#define QXMPPLOGGER_H
#include <QTextStream>
-
-class QIODevice;
+#include <QFile>
/// Singleton class
class QXmppLogger
@@ -41,22 +40,24 @@ public:
};
static QXmppLogger* getLogger();
-
QXmppLogger::LoggingType loggingType();
void setLoggingType(QXmppLogger::LoggingType);
- QDebug debug();
+ void debug(const QString& str);
+ void warning(const QString &str);
- // deprecated methods
+ // deprecated accessors, use the form without "get" instead
QXmppLogger::LoggingType Q_DECL_DEPRECATED getLoggingType();
-private:
+protected:
QXmppLogger();
- ~QXmppLogger();
+ virtual void log(QtMsgType type, const QString& str);
+private:
static QXmppLogger* m_logger;
QXmppLogger::LoggingType m_loggingType;
- QIODevice *m_device;
+ QFile m_file;
+ QTextStream m_stream;
};
#endif // QXMPPLOGGER_H