Logging libraries in C++
Posted by binglongx on July 23, 2010
So far I know of these C++ logging libraries:
- log4cxx – Apache logging framework for C++ patterned after Apache log4j (for Java).
- log4cplus – Another port of log4j from Java.
- log4cpp – Log for C++ (also similar to Log4j in Java). Not very well documented, but there is an introductory article.
- boost.log (proposal by John Torjo) – v2, but NOT accepted into boost by review 03/17/2008.
- boost.log (by Andrey Semashev) – accepted by review 03/24/2010, not yet included in current boost 1.43, but is separately downloadable.
- Pantheios – Open source C/C++ diagnostic logging API, claimed the sweet-spot with comparisons to ACE logging, boost.log (v2, John Torjo proposal), log4cpp, log4cplus and log4cxx). Installation and first tutorial.
- glog – Google Logging Library
- POCO – POCO also has a nice logging support explained.
- ACE – ACE also has logging support.
For serious use in any larger application, I would look more into either Pantheios or boost.log (new).
An Introduction to Fast Format (Part 1): The State of the Art: compares the formatting of different logging libraries/approaches
Logging In C++: Dr Dobbs article
Atomic Log Stream for C++: A very simple article