#include "abstractcliparser.h"
+class QFile;
+
class Quassel {
Q_DECLARE_TR_FUNCTIONS(Quassel)
*/
enum Feature {
SynchronizedMarkerLine = 0x0001,
+ SaslAuthentication = 0x0002,
- NumFeatures = 0x0001
+ NumFeatures = 0x0002
};
Q_DECLARE_FLAGS(Features, Feature);
static bool DEBUG;
+ enum LogLevel {
+ DebugLevel,
+ InfoLevel,
+ WarningLevel,
+ ErrorLevel
+ };
+
+ static inline LogLevel logLevel();
+ static inline QFile *logFile();
+ static inline bool logToSyslog();
+
static void logFatalMessage(const char *msg);
protected:
static QString _configDirPath;
static QStringList _dataDirPaths;
static QString _translationDirPath;
+
+ static LogLevel _logLevel;
+ static QFile *_logFile;
+ static bool _logToSyslog;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(Quassel::Features);
QString Quassel::optionValue(const QString &key) { return cliParser()->value(key); }
bool Quassel::isOptionSet(const QString &key) { return cliParser()->isSet(key); }
+Quassel::LogLevel Quassel::logLevel() { return _logLevel; }
+QFile *Quassel::logFile() { return _logFile; }
+bool Quassel::logToSyslog() { return _logToSyslog; }
+
#endif