g2log is a simple, efficient and easy to understand logger. It comes with logging, design-by-contract CHECK macros and catching and logging of fatal signals such as SIGSEGV (illegal memory access) and SIGFPE (floating point error) and more. It is cross-platform, tested on both Linux and Windows. It is free and public domain. What separates g2log from other logger utilities is that it is asynchronous. Through the Active Object pattern (see below) with C++11, g2log gets improved performance through being asynchronous. A comparison with the pseudo asynchronous Google glog (v.0.3.1) shows that g2log is much more efficient, especially in a worst case scenario. Active Object a.k.a Actor is a great design pattern that should be used way more in my opinion. Instead of using raw threads you have them encapsuled in an object. This gives you easy concurrency and good handling of threads that avoids many of the pitfalls of using raw threads (races, etc). I've put together two examples inspired by Herb Sutter's article "Prefer using active objects instead of naked threads". The first Active Object version was made with standard c++ and generic callbacks and the new second Active Object version is made with C++11 features such as std::thread
(2007) Last updated 2010-03-20
Qt with Visual Studio 2005 and with Qt code completion, it's possible and it's relatively easy to set up. See my Qt4 and Visual Studio Express 2005 C++ with Qt code completion on how it's done. |