ASF Bugzilla – Attachment 26872 Details for
Bug 51048
AsyncAppender.doAppend() does not need to be synchronized
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
A subclass of AsyncAppender that removes the unneeded synchronization
NewAsyncAppender.java (text/x-java), 901 bytes, created by
Bartek Kowalewski
on 2011-04-11 07:39:23 UTC
(
hide
)
Description:
A subclass of AsyncAppender that removes the unneeded synchronization
Filename:
MIME Type:
Creator:
Bartek Kowalewski
Created:
2011-04-11 07:39:23 UTC
Size:
901 bytes
patch
obsolete
>package org.apache.log4j; > >import org.apache.log4j.helpers.LogLog; >import org.apache.log4j.spi.Filter; >import org.apache.log4j.spi.LoggingEvent; > > >public class NewAsyncAppender extends AsyncAppender{ > > @Override > public void doAppend(LoggingEvent event) { > if(closed) { > LogLog.error("Attempted to append to closed appender named ["+name+"]."); > return; > } > > if(!isAsSevereAsThreshold(event.getLevel())) { > return; > } > > Filter f = this.headFilter; > > FILTER_LOOP: > while(f != null) { > switch(f.decide(event)) { > case Filter.DENY: return; > case Filter.ACCEPT: break FILTER_LOOP; > case Filter.NEUTRAL: f = f.getNext(); > } > } > > this.append(event); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 51048
: 26872