Boost logo

Boost :

From: Preston A. Elder (prez_at_[hidden])
Date: 2007-10-31 16:01:53


I have a question.

Have you done efficiency tests on this?

The reason I ask is the company I work for used log4cxx for our logging,
and we found it to be far too slow for high performance apps where
microseconds matter. It took up to 70 microseconds to log a message, and
a large part of this was log4cxx's reliance on streams and generic
formatters.

As a consequence, we re-wrote our own logger, with similar concepts to
log4cxx (including appenders and formatters), but at about 1/4 the speed
impact (about 20 microseconds to log a message on the same test machine).
Just by allowing things like a formatter that hard-codes the format instead
of trying to interpret the format (eg. timestamp) made a lot of difference.

I re-implemented this myself in my own open source project:
http://www.neuromancy.net/fisheye/browse/mantra/trunk/Mantra-I/mantra/core/log

But the most important thing here is that it is flexible (you can create
your own appenders, formatters, etc and register them with the system and
they will act as if they were built in) and FAST. Plus it is configurable
with boost::property_tree (which makes it easier for end-users to use).

Anyway, my code might be worth a look - but coming back to my initial question
have you done speed benchmarks? Or thought about not using streams?

Preston

On Tue, 23 Oct 2007 12:57:10 +0300, John Torjo wrote:

> Hi Jurko,
>>> He he ;) Please take a look at :
>>> http://torjo.com/log2/doc/html/
>>>
>>> I'm really interested in your feedback !
>>>
>>>
>> Actually we have looked at your library. It looks very promising and
>> we event closely followed its original boost review. It does seem to
>> have what we need (according to the docs and related posts on this
>> list) but for now we chose not to use it only because you seemed to
>> have stopped developing it for a while and no one took over as an
>> active developer.
>>
> Note that I've developed v2 from scratch, taking into account the
> feedback from the first version. So this one is waaay more flexible ;)
>
> Best,
> John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk