There is a comment in the TODO stating, "all log calls are thread safe, others are 'mulithread prepared' ".
After looking through the source code, this does not appear to be the case. I don't see any evidence that the calls have been made thread safe. Am I missing something?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, you're not missing something. log4cpp lacks full thread safety. It is safe to do log calls to the same category from multiple threads concurrently. Also almost all Appender implementations are written in such a way that they append safely (ie. don't interleave log message fragments) if the underlying OS call (e.g write() or syslog()) is atomic.
True thread safety (problably using the Boost thread library) is planned for release 0.3.0.
Bastiaan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a comment in the TODO stating, "all log calls are thread safe, others are 'mulithread prepared' ".
After looking through the source code, this does not appear to be the case. I don't see any evidence that the calls have been made thread safe. Am I missing something?
No, you're not missing something. log4cpp lacks full thread safety. It is safe to do log calls to the same category from multiple threads concurrently. Also almost all Appender implementations are written in such a way that they append safely (ie. don't interleave log message fragments) if the underlying OS call (e.g write() or syslog()) is atomic.
True thread safety (problably using the Boost thread library) is planned for release 0.3.0.
Bastiaan