From 6d5a8892f34f4034b38da467268de9d489e1024e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 19 Oct 2014 00:29:34 +0100 Subject: Use std::thread --- src/Logger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Logger.cpp') diff --git a/src/Logger.cpp b/src/Logger.cpp index cb528e8ab..fad4a5e75 100644 --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -45,7 +45,7 @@ void cLogger::LogSimple(AString a_Message, eLogLevel a_LogLevel) AString Line; #ifdef _DEBUG - Printf(Line, "[%04lx|%02d:%02d:%02d] %s\n", cIsThread::GetCurrentID(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); + Printf(Line, "[%04lx|%02d:%02d:%02d] %s\n", std::this_thread::get_id().hash(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #else Printf(Line, "[%02d:%02d:%02d] %s\n", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #endif -- cgit v1.2.3 From 6382989ba08727898587f34f505a03a9035511a2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 23 Nov 2014 14:22:05 +0000 Subject: Compilation fixes --- src/Logger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Logger.cpp') diff --git a/src/Logger.cpp b/src/Logger.cpp index fad4a5e75..c4adf4b48 100644 --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -45,7 +45,7 @@ void cLogger::LogSimple(AString a_Message, eLogLevel a_LogLevel) AString Line; #ifdef _DEBUG - Printf(Line, "[%04lx|%02d:%02d:%02d] %s\n", std::this_thread::get_id().hash(), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); + Printf(Line, "[%04lx|%02d:%02d:%02d] %s\n", std::hash()(std::this_thread::get_id()), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #else Printf(Line, "[%02d:%02d:%02d] %s\n", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #endif -- cgit v1.2.3 From 77cf65779043312087a7813a7492a71c077555bc Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 7 Dec 2014 17:28:55 +0100 Subject: Fixed format warning. --- src/Logger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Logger.cpp') diff --git a/src/Logger.cpp b/src/Logger.cpp index c4adf4b48..292622a46 100644 --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -45,12 +45,12 @@ void cLogger::LogSimple(AString a_Message, eLogLevel a_LogLevel) AString Line; #ifdef _DEBUG - Printf(Line, "[%04lx|%02d:%02d:%02d] %s\n", std::hash()(std::this_thread::get_id()), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); + Printf(Line, "[%04llx|%02d:%02d:%02d] %s\n", static_cast(std::hash()(std::this_thread::get_id())), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #else Printf(Line, "[%02d:%02d:%02d] %s\n", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str()); #endif - + cCSLock Lock(m_CriticalSection); for (size_t i = 0; i < m_LogListeners.size(); i++) { -- cgit v1.2.3