
4 May
2005
4 May
'05
9:17 p.m.
On 5/4/05, Caleb Epstein <caleb.epstein@gmail.com> 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