31 LISTEN_FOR_NOTHING = 0x00000000,
32 LISTEN_FOR_ASSERTION = 0x00000001,
33 LISTEN_FOR_ERROR = 0x00000002,
34 LISTEN_FOR_WARNING = 0x00000004,
35 LISTEN_FOR_INFORMATION = 0x00000008,
36 LISTEN_FOR_ALL = 0xFFFFFFFF
47 void Assertion(std::string
const& message);
48 void Error(std::string
const& message);
49 void Warning(std::string
const& message);
50 void Information(std::string
const& message);
53 virtual void Report(std::string
const& message) = 0;
78 Logger(
char const* file,
char const* function,
int line,
79 std::string
const& message);
87 static void Subscribe(
Listener* listener);
88 static void Unsubscribe(
Listener* listener);
93 static std::mutex msMutex;
94 static std::set<Listener*> msListeners;
97#if !defined(NE_NO_LOGGER)
99#define LogAssert(condition, message) \
102 Logger(__FILE__, __FUNCTION__, __LINE__, message).Assertion(); \
105#define LogError(message) \
106 Logger(__FILE__, __FUNCTION__, __LINE__, message).Error();
108#define LogWarning(message) \
109 Logger(__FILE__, __FUNCTION__, __LINE__, message).Warning();
111#define LogInformation(message) \
112 Logger(__FILE__, __FUNCTION__, __LINE__, message).Information();
117#define LogAssert(condition, message)
118#define LogError(message)
119#define LogWarning(message)
120#define LogInformation(message)
Logger(char const *file, char const *function, int line, std::string const &message)
Constructor.