mmartell commented on a change in pull request #918:
URL: https://github.com/apache/geode-native/pull/918#discussion_r801150167
##########
File path: cppcache/src/DistributedSystemImpl.cpp
##########
@@ -143,11 +148,26 @@ void DistributedSystemImpl::unregisterCliCallback(int
appdomainId) {
}
}
+std::string DistributedSystemImpl::getThreadName() {
+ std::thread::id id = std::this_thread::get_id();
+ std::stringstream ss;
+ ss << id;
+ std::string threadName;
+ if (g_threadNames[id] != "") {
+ threadName = ss.str() + " (" + g_threadNames[id] + ")";
+ } else {
+ threadName = ss.str();
+ }
+ return threadName;
Review comment:
I moved this logic to the formatLogLine function. Should be fine since
most work is on the main thread has no name.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]