Small logger class

后端 未结 9 1469
再見小時候
再見小時候 2020-12-12 17:24

I am looking for a small lightweight logging system in c++. I have found some existing frameworks but I don\'t need all of their features at this point in time. I primarily

9条回答
  •  执念已碎
    2020-12-12 18:08

    An update to Dr. Dobb's "A Lightweight Logger for C++": There are actually a couple of loggers referred to in Dr. Dobb's. The first one Logging In C++ which is listed in one of the answers. I tried to use this one but the source is no longer available on the Dr. Dobb's site.

    The second one that worked for me and that I recommend is A Lightweight Logger for C++ by Filip Janiszewski working at Nokia Siemens Networks. At first I had some problems getting this code to run so as I was searching for solutions, I ran across an update by the original author at: GitHub: fjanisze/logger. I found this code to be easy to understand, modify, and to use. It is thread safe and works with Visual Studio with Windows.

    Another logger mentioned above is easylogging++ . When I first tried this one it looked promising. But when I added threading and sockets2 under Windows, it crashed. I did have the defines set for threading and Sock2 but I still couldn't get it to work so I can't recommend this one. The source code is also very complex so I had no chance to modify and fix it within a reasonable amount of time.

提交回复
热议问题