Add ability to filter log messages by type.

This commit is contained in:
sledgehammer999
2016-01-24 21:38:45 +02:00
parent b0c324ace8
commit 73832a5ed8
10 changed files with 194 additions and 46 deletions

View File

@@ -12,11 +12,13 @@ namespace Log
{
enum MsgType
{
NORMAL,
INFO,
WARNING,
CRITICAL //ERROR is defined by libtorrent and results in compiler error
ALL = -1,
NORMAL = 0x1,
INFO = 0x2,
WARNING = 0x4,
CRITICAL = 0x8 //ERROR is defined by libtorrent and results in compiler error
};
Q_DECLARE_FLAGS(MsgTypes, MsgType)
struct Msg
{
@@ -36,6 +38,8 @@ namespace Log
};
}
Q_DECLARE_OPERATORS_FOR_FLAGS(Log::MsgTypes)
class Logger : public QObject
{
Q_OBJECT