Boost logo

Boost :

Subject: Re: [boost] [log] Review-ready version in the Vault
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-02-12 13:23:25


Alp Mestan wrote:
> Wouldn't it be better to do scoped logging ?
> It would prevent from mixing data when doing some MT programs, it would
> solve the "open_record()" problem, etc.
> But in this case their would be a scoped_mutex on our log writing function.
> And then, the destructor would log everything, so that we would be able to
> put many informations on the log stream and then log them all.

Yes, that's a good idea. I have answered to Vicente on this.

However, this will not solve weak record ordering in the multithreaded
application, as you seem to imply. The log record does not hold any
locks for performance reasons.


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