From b56c356de71a3edec76984ddf4202c92930bd17b Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 24 Jun 2015 15:10:23 +0300 Subject: Use ThreadContext data for logging Do not use the Environment anymore. The Environment ID is not really necessary anymore as we are forwarding exceptions to the main thread, so we always know which Map object triggered the error. --- src/mbgl/platform/log.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mbgl/platform/log.cpp b/src/mbgl/platform/log.cpp index 380113d7dc..eec33444b9 100644 --- a/src/mbgl/platform/log.cpp +++ b/src/mbgl/platform/log.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include @@ -48,16 +48,7 @@ void Log::record(EventSeverity severity, Event event, int64_t code, const std::s } std::stringstream logStream; - - if (Environment::inScope()) { - logStream << "{" << Environment::Get().getID() << "}"; - } - - const std::string threadName = Environment::threadName(); - if (!threadName.empty()) { - logStream << "{" << threadName << "}"; - } - + logStream << "{" << util::ThreadContext::getName() << "}"; logStream << "[" << event << "]"; if (code >= 0) { -- cgit v1.2.1