logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Nichele <stefano.nich...@gmail.com>
Subject why AppenderSkeleton.doAppend is synchronized ?
Date Wed, 10 Mar 2010 16:37:12 GMT
Hi all,
looking for perfomance issue in my server application, I found that 
AppenderSkeleton.doAppend method is synchronized.
I google a bit and I have found some messages but not a clear anwser to 
my doubt: why that method is synchronized ? it seems that just check the 
threshold, the filter and that "append" the event but in this way is 
serializing all log calls. I'm logging events on the db and also using 
AsyncAppender + my own appender I'm not able to obtain good performance 
since just one thread at time can append (insert) an event and the 
AsyncAppender queue grows pretty quick.

For sure i'm missing something...could you help me to understand the 
root reason for having it synchronized ? I'm thinking to have my owm 
implementation of AppenderSkeleton removing synchronization but I'm not 
sure if there are drawbacks that im not taking in consideration.

Thanks a lot in advance

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message