| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>FileAppender (Apache HBase 3.0.0-alpha-2-SNAPSHOT Test API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="FileAppender (Apache HBase 3.0.0-alpha-2-SNAPSHOT Test API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FileAppender.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/log4j/FileAppender.html" target="_top">Frames</a></li> |
| <li><a href="FileAppender.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.classes.inherited.from.class.org.apache.log4j.AppenderSkeleton">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.log4j</div> |
| <h2 title="Class FileAppender" class="title">Class FileAppender</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.log4j.AppenderSkeleton</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.log4j.WriterAppender</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.log4j.FileAppender</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler</dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.34">FileAppender</a> |
| extends org.apache.log4j.WriterAppender</pre> |
| <div class="block">Just a copy of the old log4j12 FileAppender. The ContainerLogAppender for YARN NodeManager needs |
| this class but the log4j-1.2-api bridge does not provide it which causes the UTs in |
| hbase-mapreduce module to fail if we start a separated MR cluster.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.log4j.AppenderSkeleton"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from class org.apache.log4j.AppenderSkeleton</h3> |
| <code>org.apache.log4j.AppenderSkeleton.NoOpErrorHandler</code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#bufferedIO">bufferedIO</a></span></code> |
| <div class="block">Do we do bufferedIO?</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#bufferSize">bufferSize</a></span></code> |
| <div class="block">Determines the size of IO buffer be.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#fileAppend">fileAppend</a></span></code> |
| <div class="block">Controls file truncatation.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#fileName">fileName</a></span></code> |
| <div class="block">The name of the log file.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.log4j.WriterAppender"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.log4j.WriterAppender</h3> |
| <code>encoding, immediateFlush, qw</code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.log4j.AppenderSkeleton"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.log4j.AppenderSkeleton</h3> |
| <code>closed, errorHandler, headFilter, layout, name, tailFilter, threshold</code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#FileAppender--">FileAppender</a></span>()</code> |
| <div class="block">The default constructor does not do anything.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#FileAppender-org.apache.log4j.Layout-java.lang.String-">FileAppender</a></span>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName)</code> |
| <div class="block">Instantiate a FileAppender and open the file designated by <code>filename</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#FileAppender-org.apache.log4j.Layout-java.lang.String-boolean-">FileAppender</a></span>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append)</code> |
| <div class="block">Instantiate a FileAppender and open the file designated by <code>fileName</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#FileAppender-org.apache.log4j.Layout-java.lang.String-boolean-boolean-int-">FileAppender</a></span>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append, |
| boolean bufferedIO, |
| int bufferSize)</code> |
| <div class="block">Instantiate a <code>FileAppender</code> and open the file designated by <code>fileName</code>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#activateOptions--">activateOptions</a></span>()</code> |
| <div class="block">If the value of <b>File</b> is not <code>null</code>, then <a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-"><code>setFile(java.lang.String)</code></a> is called with the |
| values of <b>File</b> and <b>Append</b> properties.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#closeFile--">closeFile</a></span>()</code> |
| <div class="block">Closes the previously opened file.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#getAppend--">getAppend</a></span>()</code> |
| <div class="block">Returns the value of the <b>Append</b> option.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#getBufferedIO--">getBufferedIO</a></span>()</code> |
| <div class="block">Get the value of the <b>BufferedIO</b> option.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#getBufferSize--">getBufferSize</a></span>()</code> |
| <div class="block">Get the size of the IO buffer.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#getFile--">getFile</a></span>()</code> |
| <div class="block">Returns the value of the <b>File</b> option.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#reset--">reset</a></span>()</code> |
| <div class="block">Close any previously opened file and call the parent's <code>reset</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setAppend-boolean-">setAppend</a></span>(boolean flag)</code> |
| <div class="block">The <b>Append</b> option takes a boolean value.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setBufferedIO-boolean-">setBufferedIO</a></span>(boolean bufferedIO)</code> |
| <div class="block">The <b>BufferedIO</b> option takes a boolean value.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setBufferSize-int-">setBufferSize</a></span>(int bufferSize)</code> |
| <div class="block">Set the size of the IO buffer.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-">setFile</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> file)</code> |
| <div class="block">The <b>File</b> property takes a string value which should be the name of the file to append |
| to.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-boolean-boolean-int-">setFile</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append, |
| boolean bufferedIO, |
| int bufferSize)</code> |
| <div class="block"> |
| Sets and <i>opens</i> the file where the log output will go.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/log4j/FileAppender.html#setQWForFiles-java.io.Writer-">setQWForFiles</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> writer)</code> |
| <div class="block">Sets the quiet writer being used.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.log4j.WriterAppender"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.log4j.WriterAppender</h3> |
| <code>append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeader</code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.log4j.AppenderSkeleton"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.log4j.AppenderSkeleton</h3> |
| <code>addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold</code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="fileAppend"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fileAppend</h4> |
| <pre>protected boolean <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.43">fileAppend</a></pre> |
| <div class="block">Controls file truncatation. The default value for this variable is <code>true</code>, meaning |
| that by default a <code>FileAppender</code> will append to an existing file and not truncate |
| it. |
| <p> |
| This option is meaningful only if the FileAppender opens the file.</div> |
| </li> |
| </ul> |
| <a name="fileName"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fileName</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.48">fileName</a></pre> |
| <div class="block">The name of the log file.</div> |
| </li> |
| </ul> |
| <a name="bufferedIO"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bufferedIO</h4> |
| <pre>protected boolean <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.53">bufferedIO</a></pre> |
| <div class="block">Do we do bufferedIO?</div> |
| </li> |
| </ul> |
| <a name="bufferSize"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>bufferSize</h4> |
| <pre>protected int <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.58">bufferSize</a></pre> |
| <div class="block">Determines the size of IO buffer be. Default is 8K.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="FileAppender--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileAppender</h4> |
| <pre>public <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.63">FileAppender</a>()</pre> |
| <div class="block">The default constructor does not do anything.</div> |
| </li> |
| </ul> |
| <a name="FileAppender-org.apache.log4j.Layout-java.lang.String-boolean-boolean-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileAppender</h4> |
| <pre>public <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.76">FileAppender</a>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append, |
| boolean bufferedIO, |
| int bufferSize) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Instantiate a <code>FileAppender</code> and open the file designated by <code>fileName</code>. |
| The opened filename will become the output destination for this appender. |
| <p> |
| If the <code>append</code> parameter is true, the file will be appended to. Otherwise, the file |
| designated by <code>fileName</code> will be truncated before being opened. |
| <p> |
| If the <code>bufferedIO</code> parameter is <code>true</code>, then buffered IO will be used to |
| write to the output file.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="FileAppender-org.apache.log4j.Layout-java.lang.String-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FileAppender</h4> |
| <pre>public <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.89">FileAppender</a>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Instantiate a FileAppender and open the file designated by <code>fileName</code>. The opened |
| filename will become the output destination for this appender. |
| <p> |
| If the <code>append</code> parameter is true, the file will be appended to. Otherwise, the file |
| designated by <code>fileName</code> will be truncated before being opened.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="FileAppender-org.apache.log4j.Layout-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FileAppender</h4> |
| <pre>public <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.100">FileAppender</a>(org.apache.log4j.Layout layout, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Instantiate a FileAppender and open the file designated by <code>filename</code>. The opened |
| filename will become the output destination for this appender. |
| <p> |
| The file will be appended to.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setFile-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFile</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.114">setFile</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> file)</pre> |
| <div class="block">The <b>File</b> property takes a string value which should be the name of the file to append |
| to. |
| <p> |
| <font color="#DD0044"><b>Note that the special values "System.out" or "System.err" are no |
| longer honored.</b></font> |
| <p> |
| Note: Actual opening of the file is made when <a href="../../../org/apache/log4j/FileAppender.html#activateOptions--"><code>activateOptions()</code></a> is called, not when the |
| options are set.</div> |
| </li> |
| </ul> |
| <a name="getAppend--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAppend</h4> |
| <pre>public boolean <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.124">getAppend</a>()</pre> |
| <div class="block">Returns the value of the <b>Append</b> option.</div> |
| </li> |
| </ul> |
| <a name="getFile--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFile</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.129">getFile</a>()</pre> |
| <div class="block">Returns the value of the <b>File</b> option.</div> |
| </li> |
| </ul> |
| <a name="activateOptions--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>activateOptions</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.139">activateOptions</a>()</pre> |
| <div class="block">If the value of <b>File</b> is not <code>null</code>, then <a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-"><code>setFile(java.lang.String)</code></a> is called with the |
| values of <b>File</b> and <b>Append</b> properties.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>activateOptions</code> in interface <code>org.apache.log4j.spi.OptionHandler</code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>activateOptions</code> in class <code>org.apache.log4j.WriterAppender</code></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.8.1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="closeFile--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>closeFile</h4> |
| <pre>protected void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.153">closeFile</a>()</pre> |
| <div class="block">Closes the previously opened file.</div> |
| </li> |
| </ul> |
| <a name="getBufferedIO--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBufferedIO</h4> |
| <pre>public boolean <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.172">getBufferedIO</a>()</pre> |
| <div class="block">Get the value of the <b>BufferedIO</b> option. |
| <p> |
| BufferedIO will significatnly increase performance on heavily loaded systems.</div> |
| </li> |
| </ul> |
| <a name="getBufferSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBufferSize</h4> |
| <pre>public int <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.179">getBufferSize</a>()</pre> |
| <div class="block">Get the size of the IO buffer.</div> |
| </li> |
| </ul> |
| <a name="setAppend-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAppend</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.191">setAppend</a>(boolean flag)</pre> |
| <div class="block">The <b>Append</b> option takes a boolean value. It is set to <code>true</code> by default. If |
| true, then <code>File</code> will be opened in append mode by <a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-"><code>setFile</code></a> (see |
| above). Otherwise, <a href="../../../org/apache/log4j/FileAppender.html#setFile-java.lang.String-"><code>setFile</code></a> will open <code>File</code> in truncate mode. |
| <p> |
| Note: Actual opening of the file is made when <a href="../../../org/apache/log4j/FileAppender.html#activateOptions--"><code>activateOptions()</code></a> is called, not when the |
| options are set.</div> |
| </li> |
| </ul> |
| <a name="setBufferedIO-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setBufferedIO</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.201">setBufferedIO</a>(boolean bufferedIO)</pre> |
| <div class="block">The <b>BufferedIO</b> option takes a boolean value. It is set to <code>false</code> by default. |
| If true, then <code>File</code> will be opened and the resulting <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a> wrapped |
| around a <a href="https://docs.oracle.com/javase/8/docs/api/java/io/BufferedWriter.html?is-external=true" title="class or interface in java.io"><code>BufferedWriter</code></a>. BufferedIO will significatnly increase performance on heavily |
| loaded systems.</div> |
| </li> |
| </ul> |
| <a name="setBufferSize-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setBufferSize</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.211">setBufferSize</a>(int bufferSize)</pre> |
| <div class="block">Set the size of the IO buffer.</div> |
| </li> |
| </ul> |
| <a name="setFile-java.lang.String-boolean-boolean-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFile</h4> |
| <pre>public void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.227">setFile</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fileName, |
| boolean append, |
| boolean bufferedIO, |
| int bufferSize) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block"><p> |
| Sets and <i>opens</i> the file where the log output will go. The specified file must be |
| writable. |
| <p> |
| If there was already an opened file, then the previous file is closed first. |
| <p> |
| <b>Do not use this method directly. To configure a FileAppender or one of its subclasses, set |
| its properties one by one and then call activateOptions.</b></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fileName</code> - The path to the log file.</dd> |
| <dd><code>append</code> - If true will append to fileName. Otherwise will truncate fileName.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setQWForFiles-java.io.Writer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setQWForFiles</h4> |
| <pre>protected void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.275">setQWForFiles</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> writer)</pre> |
| <div class="block">Sets the quiet writer being used. This method is overriden by <code>RollingFileAppender</code>.</div> |
| </li> |
| </ul> |
| <a name="reset--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>reset</h4> |
| <pre>protected void <a href="../../../src-html/org/apache/log4j/FileAppender.html#line.283">reset</a>()</pre> |
| <div class="block">Close any previously opened file and call the parent's <code>reset</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>reset</code> in class <code>org.apache.log4j.WriterAppender</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/FileAppender.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/log4j/FileAppender.html" target="_top">Frames</a></li> |
| <li><a href="FileAppender.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.classes.inherited.from.class.org.apache.log4j.AppenderSkeleton">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2007–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |