I've been testing three options for my logging subsystem in C++. One is Log4cplus, one is Pantheios and the last one is a simple logging library that we have written ourselves.
Log4cplus has been much slower than the other two. Here are the results for logging 1,000,000 log entries:
- log4cplus: 200 seconds EDIT: setting the buffer size reduced it to 120 seconds
- mylogger: 55 seconds
- Pantheios: 35 seconds
I'm wondering if I'm missing any performance tuning.
I should add that I'm always using the root logger, I'm logging to file and logging:
LOG4CPLUS_INFO(rootLogger, "Replace me with the text!");
thanks, Reza
log4cplus.rootLogger=INFO, R log4cplus.appender.R=log4cplus::FileAppender log4cplus.appender.R.File=c:\logs\log4cplusLog.log
and I get the root logger as: rootLogger = log4cplus::Logger::getRoot(); – Standardbearer