Experience using the Boost.Log log library?

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

Other libraries I'm looking at are Apache log4cxx (it seems tedious to install, but my teammates want something easy to get started) and Pantheios (the same problem as it works with an extra front and rear end).

+85
c ++ boost logging boost-log
Aug 18 '10 at 9:05
source share
3 answers

UPDATE : since it was written, Boost.Log has been replaced with its own user logging, mainly because I decided to get rid of all Boost dependencies in all my projects for various reasons. If everything is fine with Boost, I think Boost.Log is still a valid choice, judging by the Klaim answer .

My experience with Boost.Log next year.




I have successfully integrated Boost.Log into my game engine, and I can only talk about good things. Of course, it's a little early to use, since version 2 will be the real version, which will become the official Boost.Log.

Beware that version "1.0" is not supported. To receive updates, you must use a version of the bleeding edge (trunk), which may become unstable. Keep this in mind if you intend to use this version in any major projects. If you are not afraid to use short-term versions of bloodletting or future sex, then go. It is really nice to use because it is in its current state.

I have long thought that the hierarchical logging system in log4j / log4cxx is superior, but Boost.Log made me think differently. Filtering and attributes are more flexible.

The design of shells separated by an interface / backend makes it easy to add additional backends. No need to worry about synchronization or filtering issues that are handled by the interface. The library also comes with a large number of backends, rotational files, a console, syslog, a Windows event log, etc.

I painted my own shells; one goes to the game console and the other to the notification system for more serious events. It was easier than I expected by running it in a few minutes.

Last but not least, the developer / developer is really useful. You will get a lot of help on the project forums. This weekend he corrected two errors (of which one major), I reported :-)

+40
Aug. 22 '10 at 19:28
source share

UPDATE: I use Boost.Log in the game engine system and I am very pleased with it. It is fast, thread safe and very flexible when you need it.

Boost.Log is due to be provided by all Boost libraries in the next release this year (2013).




Boost.Log is made to install a log system on it. If you read the documentation, you will see that it is so flexible that any registration system that I can think of can be built with it (for example, recording on a remote computer).

So, there is a macro to facilitate use in simple projects , but I think this is a library that is mainly useful for people who really understand logging and want to create a specific architecture for their application.

On performance, I remember that there were problems in the view that made it slower compared to other (less flexible) logging libraries, but since it was a project and the first release had not yet been released, I would not have to worry if you weren't coding time critical application.

In the end, I think it's just too "new" to evaluate "now." There is no other magazine library that is as flexible as this, and I'm not sure that many people will feel the need to use it.

Update: A recent email exchange with the author of Boost.Log leads to some data that suggests that Boost.Log is a great alternative for fast logging.

+21
Aug 18 '10 at 9:33
source share

I recently learned how to implement a logging system in a project that I ran.

I tried log4cxx, as you mention it, it is really very tiring to install. It took me several hours to get it compiled under VS2012 (with other dependency libraries ...), and then it just crashed when I used it in my project. Of course, some strange things related to standard libraries are incompatible, but could not understand.

So, I switched to log4cpp, which I launched in just a few minutes. I find it elegant and light, just what I need. This has the big advantage of having the same features as the well-known log4j and co. which can be a real plus for your collaboration (configuration through a configuration file, etc.).

In terms of performance, to check if the log is active for the message level, one function call is required, then one function call to actually record the data.

With a few home-made macros (to add LINE and collaborators to posts), log4cpp was really useful in my project.

Unfortunately, I have not tried Boost.Log, so I can’t talk about it, but I hope that this feedback will still be useful for you if you decide not to follow the path of Boost.Log.

+7
Nov 27 '12 at 13:18
source share



All Articles