C++ Logging Library Setup

后端 未结 4 1108
猫巷女王i
猫巷女王i 2021-02-15 14:24

I\'ve been trying for about 2 weeks now to get a logging library to work with. I\'ve tried Log4cxx, Log4cpp, log4cplus and boost.log. The problem isn\'t that none of these wor

4条回答
  •  隐瞒了意图╮
    2021-02-15 15:16

    Boost.Log works for me quite well (Linux and Windows). It is not a header only library, there is a compiled part that you need to link against. See instructions here.

    It also depends on other, non-header, Boost libraries:

    The logging library uses several other Boost libraries that need building too. These are Boost.Filesystem, Boost.System, Boost.DateTime, Boost.Thread and Boost.Regex. Refer to their documentation for detailed instructions on the building procedure.

    Depending on your platform there may be pre-built versions of the Boost libraries. Otherwise building it yourself is straightforward if you follow the instructions. If you get stuck update your question with where exactly you got stuck and what you're seeing.

提交回复
热议问题