Reputation: 1255
I'm going to add Log4cplus for our application. Our application is written in C++ and it is multithreaded. I want to use the Log4Cplus RollingFileAppender for the same.
I know Log4Cplus was derived from Java Log4j. As I didn't know Java well, I have no idea on Log4j.
My questions are as follows,
Also can some one point me some examples for multi threaded rollingfileappender ?
Upvotes: 3
Views: 1373
Reputation: 18248
RollingFileAppender is thread safe and it is not asynchronous. To get asynchronicity, you would have to wrap the AsyncAppender around it. There is nothing special about using RollingFileAppender from multiple threads when compare to single thread. Synchronization is done for all appenders in Appender::doAppend()
.
Upvotes: 2