views:

261

answers:

2

I am considering starting to use the Boost.Log logging library. Is anyone using Boost.Log? Please share your experiences in this regard.

The other libraries I am considering are Apache log4cxx (it seems tedious to install but my team mates want something simple to get started) and Pantheios (the same problem since it works with extra front and back end).

+2  A: 

Boost.Log is made to setup a log system over it. If you read the documentation, you'll see that it's so flexible that any logging system yon can think of can be build with it (like logging on a distant computer).

So, there are macro to ease use in simple projects but I think it's the kind of library that is useful mostly to people that really understand logging and want to build a specific architecture for their application.

About performance, I remember that there was problems at the submission that made it slow compared to other (less flexible) logging libraries but as it was a draft and the first release is not out yet I would not bother if you're not coding a time-critical application.

In the end, I think it's simply too "new" to be evaluated "now". There is no other logging library that is as flexible as this one and I'm not sure if a lot of people will feel the need to use it.

Klaim
+2  A: 

I've successfully integrated Boost.Log in my game engine and I can only talk good things about it. Sure, it's a little early to use, since version 2 will be the actual version that will become the official Boost.Log.

Beware that the version "1.0" available is not being maintained. To receive updates you must use the bleeding edge (trunk) version which might become unstable. Take this into account if you are going to use this version in any serious projects. If you are not afraid to use bleeding edge versions or future breakage, then go for it. It's really nice to use as it is in its current state.

I've long thought the hierarchical logging system in log4j/log4cxx was superior, but Boost.Log has got me thinking otherwise. Filtering and attributes is way more flexible.

The design of sinks separated by frontend/backend makes it really easy to add additional backends. No need to worry about synchronization issues or filtering which is handled by the frontend. The library also comes with lots of backends already, rotational files, console, syslog, Windows event register, etc.

I have written my own sink backends; one goes to the in-game console and one to a kind of notification system for more serious events. Was easier than I expected, had it up and running in just a few minutes.

Last but not least, the maintainer/developer is really helpful as well. You'll get plenty of help in the project forums. He's fixed two bugs (whereof one major) just this weekend that I reported :-)

Oskar N.