C++ Logger Performance and Portability

1.4k Views Asked by At

I'm writing a C++ application, that I have to deploy to a server in the future (maybe as a node.js C++ module).
I really need a logging library that help me during the development process. Now I'm using log4cxx, but I need the code to be portable, so I prefer to have a source file to include in the project. I also need a performing C++ logger, that does not slow down the application in both case with logging turned on and off. Can anyone help me with this choice? My options are:

  1. Log4cplus: simple and easy to use and extend. But performance?
  2. Google-Glog: easiest to use and very very fast. But I need to compile it and it use system flag, I wonder if it is a problem when I use it with node.js.
1

There are 1 best solutions below

2
On

As far as I know the log4cxx uses Apache runtime as its base so ,portability is not an issue with log4cxx. Also it provides macros for optimized logging. Is there anyother reason you want to shift from log4cxx?