Boost logo

Boost :

From: John Torjo (john.groups_at_[hidden])
Date: 2007-11-01 09:18:27


>> Note that logging can also become way faster if you do it on a dedicated
>> thread (on_dedicated_thread.hpp class). I haven't yet tested this, but
>> it's gonna be way faster than doing logging on the thread the message is
>> logged. Basically, the only thing that happens in the current thread is
>> gathering the message. Writing it (formatting it and then writing it to
>> the destination(s)) will happen on the other thread.
>> Thus, any destination you might have - can automatically become
>> asynchronous as well ;) )
>>
> Yah, log4cxx and my logger also support async logging. But this is not
> possible where I work (large financial). If use async logging, you have
> a queue between your app thread and the logging thread. If your app
> crashes, anything in that queue is lost. This is hell on wheels for
> debugging. Plus some important information is lost ("Oops! We don't
> know which of the $30 million in trades were sent to the market and which
> weren't!"). So while I know Async logging is faster, it is not practical
> in any important application.
>
>
He he ;) Good point. Well, you can do something like this:
- sync logging into a memory drive (thus, if app crashes, you can still
read the drive) - this, in a rather raw form (not much formatting),
- and async logging to other destination(s) - files, http, mail,
whatever; with all the pretty formatting you wish
>> (note : your appenders = my destinations)
>>
>> I'd be curious to see how my lib benchmarks against what solution your
>> company took ;)
>>
> I will see if I can grab your logger and benchmark it against mine -
> first using generic formatters, then using custom formatters (which
> increase efficiency dramatically).
>
Coolio ;)

Best,
John
> PreZ :)
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>

-- 
http://John.Torjo.com -- C++ expert
... call me only if you want things done right

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