32 #include <gtest/gtest.h> 34 #include <boost/thread.hpp> 36 #include "log4cxx/appenderskeleton.h" 37 #include "log4cxx/spi/loggingevent.h" 56 virtual void append(
const log4cxx::spi::LoggingEventPtr& event, log4cxx::helpers::Pool&)
59 info.
level_ =
event->getLevel();
63 info_.push_back( info );
82 TEST(Rosconsole, threadedCalls)
87 logger->addAppender( appender );
89 boost::thread_group tg;
91 for (uint32_t i = 0; i < 10; ++i)
97 ASSERT_EQ(appender->
info_.size(), 10ULL);
99 logger->removeAppender(appender);
102 int main(
int argc,
char **argv)
104 testing::InitGoogleTest(&argc, argv);
107 return RUN_ALL_TESTS();
TEST(Rosconsole, threadedCalls)
int main(int argc, char **argv)
std::vector< Info > V_Info
void threadFunc(boost::barrier *b)
virtual bool requiresLayout() const
virtual void append(const log4cxx::spi::LoggingEventPtr &event, log4cxx::helpers::Pool &)
#define ROSCONSOLE_DEFAULT_NAME