lucadestudios team mailing list archive
-
lucadestudios team
-
Mailing list archive
-
Message #00007
New log library: boost.log
After a recent discussion with Sean about code reuse.. I started
pondering whether I really had exhausted all the alternatives before
starting on my own logger. I don't want us to use a log4java port, for
two reasons, 1. I don't believe it fits well into surrounding C++ code
(naming differs from the STL and the stream usage is minimal), 2.
Log4cxx at least brings with it a lot of gumpf that we wouldn't use;
it's overkill.
So I looked around but I couldn't find anything I liked, I want
support for channels, as well as debug levels, and I want the
initialization to be minimal.. I basically just want to log stuff
without compiling in the world.
Anyway, long story short, I stumbled across this:
http://archives.free.net.ph/message/20090208.155854.b65f47ea.de.html
It's a library proposed for boost, some other guy spent years trying
to get his log library in but it kept being rejected, but this one
looks loads better. I've had some problems building the accompanying
library but the boost IRC channel has helped me out:
<Dodheim> Kazade, did you extract boost.log into the normal boost
directory structure?
<Kazade> ah
no :)
suddenly everything makes sense :)
<Dodheim> once you do that, go to the root boost folder, and do "bjam
--with-log --build-type=complete stage"
<Kazade> thanks, I'll try it tonight ;)
<Dodheim> also, see
http://boost-log.sourceforge.net/libs/log/doc/html/log/installation.html
you may want to add some defines
BOOST_LOG_USE_CHAR at the least
<Kazade> ok cool
So basically I spent 3 hours last night being a dumbarse...
Tonight or tomorrow I'll add the library and sources to bzr, and
remove my own logger from the repo. I fairly sure this library will
get into boost in the next few months at that point we can just pull
it from the repo.
Luke.