On Jun 8, 2008, at 1:43 PM, N N Murthy wrote:

Our application is multi threaded application, developed using boost thread library. Is log4cxx thread safe? Where can we get more information?

N N Murthy


Logging should be thread-safe, all appenders and layouts that use shared resources should use mutexes to prevent simultaneous access to the resources. However, the standard disclaimers of warrantee or suitability for purpose apply here too. Can't promise that you can't get into trouble.

If there are synchronization issues, they are more likely to occur when reconfiguring log4cxx during logging, so I'd recommend configuring log4cxx (either explicitly by a call to a configurator or implicitly by a making a logging request) before spinning up your threads.

Reply via email to