I was searching for a suitable logging library. Previously, I was using log4cpp but I want to use the Apache logging library. First you have to compile:
– Apr -> libapr-1.dll
– AprIconv -> libapriconv-1.dll
– AprUtil -> libaprutil-1.dll
– expat -> expat.dll
and then log4cxx -> log4cxx.dll.
The problem is that log4cxx use a macro for defining a vector<> template based stuff. All the macros named LOG4CXX_LIST_DEF should be moved from the end of the headers to the top of the header. There are about 20 entries to move.
Another problem is to remove the namespace from the KeySet class. Every time there is scope::KeySet, you should write KeySet only.
After 1 or 2 hours fixing the errors, you should be ok to recompile this library. Size of log4cxx.dll is 4MB (debug mode).
Tagged: C++
Leave a Reply