OmniThreads.cpp
Go to the documentation of this file.
00001 #include <log4cpp/threading/Threading.hh>
00002 
00003 #if defined(LOG4CPP_HAVE_THREADING) && defined(LOG4CPP_USE_OMNITHREADS)
00004 
00005 namespace log4cpp {
00006     namespace threading {
00007 
00008         char* getThreadId(char* buffer) {
00009             ::sprintf(buffer, "%d", ::omni_thread::self()->id()););
00010             return buffer;
00011         }
00012 
00013         std::string getThreadId() {
00014             char buffer[16];
00015             sprintf(buffer, "%d", ::omni_thread::self()->id());
00016             return std::string(buffer);
00017         };
00018     }
00019 }
00020 
00021 #endif // LOG4CPP_HAVE_THREADING && LOG4CPP_USE_ONMITHREADS


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung.
autogenerated on Wed Sep 16 2015 10:27:14