improved server logging

This commit is contained in:
Max-Wilhelm Bruker 2011-03-21 21:47:42 +01:00
parent 75d78ca147
commit 2336ab0f45
5 changed files with 95 additions and 14 deletions

View file

@ -0,0 +1,25 @@
#ifndef SERVER_LOGGER_H
#define SERVER_LOGGER_H
#include <QObject>
class QSocketNotifier;
class QFile;
class ServerLogger : public QObject {
Q_OBJECT
public:
ServerLogger(QObject *parent = 0);
~ServerLogger();
static void hupSignalHandler(int unused);
public slots:
void logMessage(QString message);
private slots:
void handleSigHup();
private:
static int sigHupFD[2];
QSocketNotifier *snHup;
static QFile *logFile;
};
#endif