mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
improved server logging
This commit is contained in:
parent
75d78ca147
commit
2336ab0f45
5 changed files with 95 additions and 14 deletions
25
servatrice/src/server_logger.h
Normal file
25
servatrice/src/server_logger.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue