boost log库,熟练使用Boost.Log日志库?

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).

解决方案

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 :-)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值