Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-05-04 16:17:51

On 5/4/05, Caleb Epstein <caleb.epstein_at_[hidden]> wrote:
> Without some sort of buffer between message formatting and message
> output, how do you allow multiple threads to write to a log without
> intermingling their messages? Locking on every op<< isn't good
> enough.

Actually, a way just occurred to me immediately after sending this.
The proxy object that holds the stream ref that is the target of op<<
could hold a lock as well. Still, I don't like this idea. I prefer
the current design with its incremental formatting of individual
BOOST_LOG messages in a stringstream with flushing to the appenders
when the message is complete.

Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at, gregod at, cpdaniel at, john at