Better logging library for C++ [closed]

2019-01-21 10:45发布

In our project now we using log4cxx, but those library don't develope some years, also we have some problems with it. Could you advise some library for logging in C++. Library must support multithreade logging, system-log. Also it'll be good if it support logging via << operator. Also lib license must be very democracy - like boost, apache etc Crossplatform support. Must support linux, windows. Better if it support solaris, aix, hp-ux, but it's not necessary.

标签: c++ logging
4条回答
可以哭但决不认输i
2楼-- · 2019-01-21 11:22

boost::log is probably the most versatile and well-written logging library I've seen. It's pretty complicated but really genius at the same time. And it does everything you can think of and then some more.

查看更多
SAY GOODBYE
3楼-- · 2019-01-21 11:28

Check out pantheios!

查看更多
走好不送
4楼-- · 2019-01-21 11:39

I use the glog library, by google (because I could not install Boost.Log easily). It is both simple to use and powerfull.

查看更多
贪生不怕死
5楼-- · 2019-01-21 11:39

We use log4cplus in our company, it provides a complex hierarchical logging system (based on log4j). It seems to have everything you are asking for. It provides many appenders (I personally choose this library for the rolling files linux/windows and linux Syslog).

The library is quite simple to compile and deploy on both linux & windows And do the job no problem so far (about 4 years in production).

Only drawback, the lack of documentation but the code it quite self-explanatory. Good new is you could go to the log4j documentation page to understand how configurators/patterns/etc works ...

查看更多
登录 后发表回答