Go to the documentation of this file.00001 #include <log4cpp/threading/Threading.hh>
00002
00003 #if defined(LOG4CPP_HAVE_THREADING) && defined(LOG4CPP_USE_PTHREADS)
00004
00005 namespace log4cpp {
00006 namespace threading {
00007
00008 char* getThreadId(char* buffer) {
00009 ::sprintf(buffer, "%ld", (long int)pthread_self());
00010 return buffer;
00011 }
00012
00013 std::string getThreadId() {
00014 char buffer[16];
00015 ::sprintf(buffer, "%ld", (long int)pthread_self());
00016 return std::string(buffer);
00017 }
00018
00019 }
00020 }
00021
00022 #endif // LOG4CPP_HAVE_THREADING && LOG4CPP_USE_PTHREADS
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sat Jun 8 2019 18:45:46