#include #include #include #include #include #include #include using namespace std; using namespace log4cplus; using namespace log4cplus::helpers; log4cplus::tostream& operator <<(log4cplus::tostream& s, const Time& t) { return s << t.sec() << "sec " << t.usec() << "usec"; } #define LOOP_COUNT 100000 int main() { tcout << LOG4CPLUS_TEXT("Entering main()...") << endl; log4cplus::initialize (); PropertyConfigurator::doConfigure(LOG4CPLUS_TEXT("log4cplus.properties")); Logger root = Logger::getRoot(); try { Logger logger = Logger::getInstance(LOG4CPLUS_TEXT("testlogger")); LOG4CPLUS_WARN(Logger::getRoot (), "Starting test loop...."); Time start = Time::gettimeofday(); tstring msg(LOG4CPLUS_TEXT("This is a WARNING...")); int i = 0; for(i=0; i