summaryrefslogtreecommitdiffstats
path: root/src/Logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Logger.cpp')
-rw-r--r--src/Logger.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/Logger.cpp b/src/Logger.cpp
index 434218824..438fba5e9 100644
--- a/src/Logger.cpp
+++ b/src/Logger.cpp
@@ -4,7 +4,7 @@
#include "OSSupport/IsThread.h"
#ifdef _WIN32
- #include <time.h>
+#include <time.h>
#endif
@@ -25,14 +25,15 @@ static void WriteLogOpener(fmt::memory_buffer & Buffer)
#ifndef NDEBUG
const auto ThreadID = std::hash<std::thread::id>()(std::this_thread::get_id());
fmt::format_to(
- Buffer, "[{0:04x}|{1:02d}:{2:02d}:{3:02d}] ",
- ThreadID, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec
+ Buffer,
+ "[{0:04x}|{1:02d}:{2:02d}:{3:02d}] ",
+ ThreadID,
+ timeinfo.tm_hour,
+ timeinfo.tm_min,
+ timeinfo.tm_sec
);
#else
- fmt::format_to(
- Buffer, "[{0:02d}:{1:02d}:{2:02d}] ",
- timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec
- );
+ fmt::format_to(Buffer, "[{0:02d}:{1:02d}:{2:02d}] ", timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
#endif
}
@@ -119,7 +120,7 @@ cLogger::cAttachment cLogger::AttachListener(std::unique_ptr<cListener> a_Listen
cCSLock Lock(m_CriticalSection);
m_LogListeners.push_back(std::move(a_Listener));
}
- return cAttachment{nonOwning};
+ return cAttachment {nonOwning};
}
@@ -129,16 +130,11 @@ cLogger::cAttachment cLogger::AttachListener(std::unique_ptr<cListener> a_Listen
void cLogger::DetachListener(cListener * a_Listener)
{
cCSLock Lock(m_CriticalSection);
- m_LogListeners.erase(
- std::remove_if(
- m_LogListeners.begin(),
- m_LogListeners.end(),
- [=](std::unique_ptr<cListener> & a_OtherListener) -> bool
- {
- return a_OtherListener.get() == a_Listener;
- }
- )
- );
+ m_LogListeners.erase(std::remove_if(
+ m_LogListeners.begin(),
+ m_LogListeners.end(),
+ [=](std::unique_ptr<cListener> & a_OtherListener) -> bool { return a_OtherListener.get() == a_Listener; }
+ ));
}