| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_31) --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| AsyncAppender (Apache Log4j 1.2.17 API) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2012-06-09"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AsyncAppender (Apache Log4j 1.2.17 API)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AsyncAppender.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A> |
| <A HREF="../../../org/apache/log4j/BasicConfigurator.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?org/apache/log4j/AsyncAppender.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="AsyncAppender.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.log4j</FONT> |
| <BR> |
| Class AsyncAppender</H2> |
| <PRE> |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">org.apache.log4j.AppenderSkeleton</A> |
| <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.apache.log4j.AsyncAppender</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A>, <A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A>, <A HREF="../../../org/apache/log4j/spi/OptionHandler.html" title="interface in org.apache.log4j.spi">OptionHandler</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public class <B>AsyncAppender</B><DT>extends <A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A><DT>implements <A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></DL> |
| </PRE> |
| |
| <P> |
| The AsyncAppender lets users log events asynchronously. |
| <p/> |
| <p/> |
| The AsyncAppender will collect the events sent to it and then dispatch them |
| to all the appenders that are attached to it. You can attach multiple |
| appenders to an AsyncAppender. |
| </p> |
| <p/> |
| <p/> |
| The AsyncAppender uses a separate thread to serve the events in its buffer. |
| </p> |
| <p/> |
| <b>Important note:</b> The <code>AsyncAppender</code> can only be script |
| configured using the <A HREF="../../../org/apache/log4j/xml/DOMConfigurator.html" title="class in org.apache.log4j.xml"><CODE>DOMConfigurator</CODE></A>. |
| </p> |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>0.9.1</DD> |
| <DT><B>Author:</B></DT> |
| <DD>Ceki Gülcü, Curt Arnold</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#DEFAULT_BUFFER_SIZE">DEFAULT_BUFFER_SIZE</A></B></CODE> |
| |
| <BR> |
| The default buffer size is set to 128 events.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="fields_inherited_from_class_org.apache.log4j.AppenderSkeleton"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Fields inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html#closed">closed</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#errorHandler">errorHandler</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#headFilter">headFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#layout">layout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#name">name</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#tailFilter">tailFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#threshold">threshold</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#AsyncAppender()">AsyncAppender</A></B>()</CODE> |
| |
| <BR> |
| Create new instance.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#addAppender(org.apache.log4j.Appender)">addAppender</A></B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> newAppender)</CODE> |
| |
| <BR> |
| Add appender.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#append(org.apache.log4j.spi.LoggingEvent)">append</A></B>(<A HREF="../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A> event)</CODE> |
| |
| <BR> |
| Subclasses of <code>AppenderSkeleton</code> should implement this |
| method to perform actual logging.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#close()">close</A></B>()</CODE> |
| |
| <BR> |
| Close this <code>AsyncAppender</code> by interrupting the dispatcher |
| thread which will process all pending events before exiting.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#getAllAppenders()">getAllAppenders</A></B>()</CODE> |
| |
| <BR> |
| Get iterator over attached appenders.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#getAppender(java.lang.String)">getAppender</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name)</CODE> |
| |
| <BR> |
| Get appender by name.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#getBlocking()">getBlocking</A></B>()</CODE> |
| |
| <BR> |
| Gets whether appender should block calling thread when buffer is full.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#getBufferSize()">getBufferSize</A></B>()</CODE> |
| |
| <BR> |
| Gets the current buffer size.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#getLocationInfo()">getLocationInfo</A></B>()</CODE> |
| |
| <BR> |
| Gets whether the location of the logging request call |
| should be captured.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#isAttached(org.apache.log4j.Appender)">isAttached</A></B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> appender)</CODE> |
| |
| <BR> |
| Determines if specified appender is attached.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#removeAllAppenders()">removeAllAppenders</A></B>()</CODE> |
| |
| <BR> |
| Removes and closes all attached appenders.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#removeAppender(org.apache.log4j.Appender)">removeAppender</A></B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> appender)</CODE> |
| |
| <BR> |
| Removes an appender.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#removeAppender(java.lang.String)">removeAppender</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name)</CODE> |
| |
| <BR> |
| Remove appender by name.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#requiresLayout()">requiresLayout</A></B>()</CODE> |
| |
| <BR> |
| Configurators call this method to determine if the appender |
| requires a layout.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#setBlocking(boolean)">setBlocking</A></B>(boolean value)</CODE> |
| |
| <BR> |
| Sets whether appender should wait if there is no |
| space available in the event buffer or immediately return.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#setBufferSize(int)">setBufferSize</A></B>(int size)</CODE> |
| |
| <BR> |
| Sets the number of messages allowed in the event buffer |
| before the calling thread is blocked (if blocking is true) |
| or until messages are summarized and discarded.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/log4j/AsyncAppender.html#setLocationInfo(boolean)">setLocationInfo</A></B>(boolean flag)</CODE> |
| |
| <BR> |
| The <b>LocationInfo</b> option takes a boolean value.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_org.apache.log4j.AppenderSkeleton"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html#activateOptions()">activateOptions</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#addFilter(org.apache.log4j.spi.Filter)">addFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#clearFilters()">clearFilters</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#doAppend(org.apache.log4j.spi.LoggingEvent)">doAppend</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#finalize()">finalize</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getErrorHandler()">getErrorHandler</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getFilter()">getFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getFirstFilter()">getFirstFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getLayout()">getLayout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getName()">getName</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getThreshold()">getThreshold</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#isAsSevereAsThreshold(org.apache.log4j.Priority)">isAsSevereAsThreshold</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setErrorHandler(org.apache.log4j.spi.ErrorHandler)">setErrorHandler</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setLayout(org.apache.log4j.Layout)">setLayout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setName(java.lang.String)">setName</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setThreshold(org.apache.log4j.Priority)">setThreshold</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="DEFAULT_BUFFER_SIZE"><!-- --></A><H3> |
| DEFAULT_BUFFER_SIZE</H3> |
| <PRE> |
| public static final int <B>DEFAULT_BUFFER_SIZE</B></PRE> |
| <DL> |
| <DD>The default buffer size is set to 128 events. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.log4j.AsyncAppender.DEFAULT_BUFFER_SIZE">Constant Field Values</A></DL> |
| </DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="AsyncAppender()"><!-- --></A><H3> |
| AsyncAppender</H3> |
| <PRE> |
| public <B>AsyncAppender</B>()</PRE> |
| <DL> |
| <DD>Create new instance. |
| <P> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="addAppender(org.apache.log4j.Appender)"><!-- --></A><H3> |
| addAppender</H3> |
| <PRE> |
| public void <B>addAppender</B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> newAppender)</PRE> |
| <DL> |
| <DD>Add appender. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#addAppender(org.apache.log4j.Appender)">addAppender</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>newAppender</CODE> - appender to add, may not be null.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="append(org.apache.log4j.spi.LoggingEvent)"><!-- --></A><H3> |
| append</H3> |
| <PRE> |
| public void <B>append</B>(<A HREF="../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A> event)</PRE> |
| <DL> |
| <DD>Subclasses of <code>AppenderSkeleton</code> should implement this |
| method to perform actual logging. See also <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#doAppend(org.apache.log4j.spi.LoggingEvent)"><CODE>AppenderSkeleton.doAppend</CODE></A> method. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html#append(org.apache.log4j.spi.LoggingEvent)">append</A></CODE> in class <CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="close()"><!-- --></A><H3> |
| close</H3> |
| <PRE> |
| public void <B>close</B>()</PRE> |
| <DL> |
| <DD>Close this <code>AsyncAppender</code> by interrupting the dispatcher |
| thread which will process all pending events before exiting. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/Appender.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAllAppenders()"><!-- --></A><H3> |
| getAllAppenders</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</A> <B>getAllAppenders</B>()</PRE> |
| <DL> |
| <DD>Get iterator over attached appenders. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#getAllAppenders()">getAllAppenders</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>iterator or null if no attached appenders.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getAppender(java.lang.String)"><!-- --></A><H3> |
| getAppender</H3> |
| <PRE> |
| public <A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> <B>getAppender</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name)</PRE> |
| <DL> |
| <DD>Get appender by name. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#getAppender(java.lang.String)">getAppender</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - name, may not be null. |
| <DT><B>Returns:</B><DD>matching appender or null.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getLocationInfo()"><!-- --></A><H3> |
| getLocationInfo</H3> |
| <PRE> |
| public boolean <B>getLocationInfo</B>()</PRE> |
| <DL> |
| <DD>Gets whether the location of the logging request call |
| should be captured. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the current value of the <b>LocationInfo</b> option.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isAttached(org.apache.log4j.Appender)"><!-- --></A><H3> |
| isAttached</H3> |
| <PRE> |
| public boolean <B>isAttached</B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> appender)</PRE> |
| <DL> |
| <DD>Determines if specified appender is attached. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#isAttached(org.apache.log4j.Appender)">isAttached</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>appender</CODE> - appender. |
| <DT><B>Returns:</B><DD>true if attached.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="requiresLayout()"><!-- --></A><H3> |
| requiresLayout</H3> |
| <PRE> |
| public boolean <B>requiresLayout</B>()</PRE> |
| <DL> |
| <DD>Configurators call this method to determine if the appender |
| requires a layout. If this method returns <code>true</code>, |
| meaning that layout is required, then the configurator will |
| configure an layout using the configuration information at its |
| disposal. If this method returns <code>false</code>, meaning that |
| a layout is not required, then layout configuration will be |
| skipped even if there is available layout configuration |
| information at the disposal of the configurator.. |
| |
| <p>In the rather exceptional case, where the appender |
| implementation admits a layout but can also work without it, then |
| the appender should return <code>true</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/Appender.html#requiresLayout()">requiresLayout</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="removeAllAppenders()"><!-- --></A><H3> |
| removeAllAppenders</H3> |
| <PRE> |
| public void <B>removeAllAppenders</B>()</PRE> |
| <DL> |
| <DD>Removes and closes all attached appenders. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#removeAllAppenders()">removeAllAppenders</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="removeAppender(org.apache.log4j.Appender)"><!-- --></A><H3> |
| removeAppender</H3> |
| <PRE> |
| public void <B>removeAppender</B>(<A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A> appender)</PRE> |
| <DL> |
| <DD>Removes an appender. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#removeAppender(org.apache.log4j.Appender)">removeAppender</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>appender</CODE> - appender to remove.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="removeAppender(java.lang.String)"><!-- --></A><H3> |
| removeAppender</H3> |
| <PRE> |
| public void <B>removeAppender</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name)</PRE> |
| <DL> |
| <DD>Remove appender by name. |
| <P> |
| <DD><DL> |
| <DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html#removeAppender(java.lang.String)">removeAppender</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/AppenderAttachable.html" title="interface in org.apache.log4j.spi">AppenderAttachable</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - name.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setLocationInfo(boolean)"><!-- --></A><H3> |
| setLocationInfo</H3> |
| <PRE> |
| public void <B>setLocationInfo</B>(boolean flag)</PRE> |
| <DL> |
| <DD>The <b>LocationInfo</b> option takes a boolean value. By default, it is |
| set to false which means there will be no effort to extract the location |
| information related to the event. As a result, the event that will be |
| ultimately logged will likely to contain the wrong location information |
| (if present in the log format). |
| <p/> |
| <p/> |
| Location information extraction is comparatively very slow and should be |
| avoided unless performance is not a concern. |
| </p> |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>flag</CODE> - true if location information should be extracted.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setBufferSize(int)"><!-- --></A><H3> |
| setBufferSize</H3> |
| <PRE> |
| public void <B>setBufferSize</B>(int size)</PRE> |
| <DL> |
| <DD>Sets the number of messages allowed in the event buffer |
| before the calling thread is blocked (if blocking is true) |
| or until messages are summarized and discarded. Changing |
| the size will not affect messages already in the buffer. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>size</CODE> - buffer size, must be positive.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBufferSize()"><!-- --></A><H3> |
| getBufferSize</H3> |
| <PRE> |
| public int <B>getBufferSize</B>()</PRE> |
| <DL> |
| <DD>Gets the current buffer size. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the current value of the <b>BufferSize</b> option.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setBlocking(boolean)"><!-- --></A><H3> |
| setBlocking</H3> |
| <PRE> |
| public void <B>setBlocking</B>(boolean value)</PRE> |
| <DL> |
| <DD>Sets whether appender should wait if there is no |
| space available in the event buffer or immediately return. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>value</CODE> - true if appender should wait until available space in buffer.<DT><B>Since:</B></DT> |
| <DD>1.2.14</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getBlocking()"><!-- --></A><H3> |
| getBlocking</H3> |
| <PRE> |
| public boolean <B>getBlocking</B>()</PRE> |
| <DL> |
| <DD>Gets whether appender should block calling thread when buffer is full. |
| If false, messages will be counted by logger and a summary |
| message appended after the contents of the buffer have been appended. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>true if calling thread will be blocked when buffer is full.<DT><B>Since:</B></DT> |
| <DD>1.2.14</DD> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AsyncAppender.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A> |
| <A HREF="../../../org/apache/log4j/BasicConfigurator.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?org/apache/log4j/AsyncAppender.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="AsyncAppender.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 1999-2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |