diff options
Diffstat (limited to 'src/Logger.h')
-rw-r--r-- | src/Logger.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/Logger.h b/src/Logger.h index fee2554be..20341e9a3 100644 --- a/src/Logger.h +++ b/src/Logger.h @@ -4,23 +4,24 @@ class cLogger { -public: - + public: class cListener { - public: + public: virtual void Log(std::string_view a_Message, eLogLevel a_LogLevel) = 0; - virtual ~cListener(){} + virtual ~cListener() {} }; class cAttachment { - public: - - cAttachment() : m_listener(nullptr) {} - cAttachment(cAttachment && a_other) - : m_listener(a_other.m_listener) + public: + cAttachment() : + m_listener(nullptr) + { + } + cAttachment(cAttachment && a_other) : + m_listener(a_other.m_listener) { a_other.m_listener = nullptr; } @@ -40,13 +41,15 @@ public: return *this; } - private: - + private: cListener * m_listener; friend class cLogger; - cAttachment(cListener * a_listener) : m_listener(a_listener) {} + cAttachment(cListener * a_listener) : + m_listener(a_listener) + { + } }; /** Log a message formatted with a printf style formatting string. */ @@ -65,8 +68,7 @@ public: // Must be called before calling GetInstance in a multithreaded context static void InitiateMultithreading(); -private: - + private: cCriticalSection m_CriticalSection; std::vector<std::unique_ptr<cListener>> m_LogListeners; |