| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <meta name="generator" content="ApiGen 2.8.0" /> |
| |
| <title>Class LoggerAppenderFile | Apache log4php</title> |
| |
| <script type="text/javascript" src="resources/combined.js?238209907"></script> |
| <script type="text/javascript" src="elementlist.js?4055067042"></script> |
| <link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" /> |
| |
| <script type="text/javascript"> |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', "UA-26177991-1"]); |
| _gaq.push(['_trackPageview']); |
| |
| (function() { |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| })(); |
| </script> |
| </head> |
| |
| <body> |
| <div id="left"> |
| <div id="menu"> |
| <a href="index.html" title="Overview"><span>Overview</span></a> |
| |
| |
| <div id="groups"> |
| <h3>Packages</h3> |
| <ul> |
| <li class="active"><a href="package-log4php.html">log4php<span></span></a> |
| <ul> |
| <li class="active"><a href="package-log4php.appenders.html">appenders</a> |
| </li> |
| <li><a href="package-log4php.configurators.html">configurators</a> |
| </li> |
| <li><a href="package-log4php.filters.html">filters</a> |
| </li> |
| <li><a href="package-log4php.helpers.html">helpers</a> |
| </li> |
| <li><a href="package-log4php.layouts.html">layouts</a> |
| </li> |
| <li><a href="package-log4php.pattern.html">pattern</a> |
| </li> |
| <li><a href="package-log4php.renderers.html">renderers</a> |
| </li> |
| </ul></li> |
| </ul> |
| </div> |
| |
| <hr /> |
| |
| |
| <div id="elements"> |
| <h3>Classes</h3> |
| <ul> |
| <li><a href="class-LoggerAppenderConsole.html">LoggerAppenderConsole</a></li> |
| <li><a href="class-LoggerAppenderDailyFile.html">LoggerAppenderDailyFile</a></li> |
| <li><a href="class-LoggerAppenderEcho.html">LoggerAppenderEcho</a></li> |
| <li class="active"><a href="class-LoggerAppenderFile.html">LoggerAppenderFile</a></li> |
| <li><a href="class-LoggerAppenderFirePHP.html">LoggerAppenderFirePHP</a></li> |
| <li><a href="class-LoggerAppenderMail.html">LoggerAppenderMail</a></li> |
| <li><a href="class-LoggerAppenderMailEvent.html">LoggerAppenderMailEvent</a></li> |
| <li><a href="class-LoggerAppenderMongoDB.html">LoggerAppenderMongoDB</a></li> |
| <li><a href="class-LoggerAppenderNull.html">LoggerAppenderNull</a></li> |
| <li><a href="class-LoggerAppenderPDO.html">LoggerAppenderPDO</a></li> |
| <li><a href="class-LoggerAppenderPhp.html">LoggerAppenderPhp</a></li> |
| <li><a href="class-LoggerAppenderRollingFile.html">LoggerAppenderRollingFile</a></li> |
| <li><a href="class-LoggerAppenderSocket.html">LoggerAppenderSocket</a></li> |
| <li><a href="class-LoggerAppenderSyslog.html">LoggerAppenderSyslog</a></li> |
| </ul> |
| |
| |
| |
| |
| |
| </div> |
| </div> |
| </div> |
| |
| <div id="splitter"></div> |
| |
| <div id="right"> |
| <div id="rightInner"> |
| <form id="search"> |
| <input type="hidden" name="cx" value="" /> |
| <input type="hidden" name="ie" value="UTF-8" /> |
| <input type="text" name="q" class="text" /> |
| <input type="submit" value="Search" /> |
| </form> |
| |
| <div id="navigation"> |
| <ul> |
| <li> |
| <a href="index.html" title="Overview"><span>Overview</span></a> |
| </li> |
| <li> |
| <a href="package-log4php.appenders.html" title="Summary of log4php\appenders"><span>Package</span></a> |
| </li> |
| <li class="active"> |
| <span>Class</span> </li> |
| </ul> |
| <ul> |
| <li> |
| <a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a> |
| </li> |
| </ul> |
| <ul> |
| </ul> |
| </div> |
| |
| <div id="content" class="class"> |
| <h1>Class LoggerAppenderFile</h1> |
| |
| |
| <div class="description"> |
| |
| <p>LoggerAppenderFile appends log events to a file.</p> |
| |
| <p>This appender uses a layout.</p> |
| |
| <h1>Configurable parameters:</h1> |
| |
| <ul> |
| <li><strong>file</strong> - Path to the target file. Relative paths are resolved |
| based on the working directory.</li> |
| |
| <li><strong>append</strong> - If set to true, the appender will append to the |
| file, otherwise the file contents will be overwritten.</li> |
| </ul> |
| |
| </div> |
| |
| <dl class="tree"> |
| <dd style="padding-left:0px"> |
| <a href="class-LoggerConfigurable.html"><span>LoggerConfigurable</span></a> |
| |
| |
| |
| </dd> |
| <dd style="padding-left:30px"> |
| <img src="resources/inherit.png" alt="Extended by" /> |
| <a href="class-LoggerAppender.html"><span>LoggerAppender</span></a> |
| |
| |
| |
| </dd> |
| <dd style="padding-left:60px"> |
| <img src="resources/inherit.png" alt="Extended by" /> |
| <b><span>LoggerAppenderFile</span></b> |
| |
| |
| </dd> |
| </dl> |
| |
| |
| <div> |
| <h4>Direct known subclasses</h4> |
| <a href="class-LoggerAppenderDailyFile.html">LoggerAppenderDailyFile</a>, |
| <a href="class-LoggerAppenderRollingFile.html">LoggerAppenderRollingFile</a> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div class="info"> |
| |
| |
| |
| <b>Package:</b> <a href="package-log4php.html">log4php</a>\<a href="package-log4php.appenders.html">appenders</a><br /> |
| |
| <b>License:</b> |
| <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a><br /> |
| <b>Version:</b> |
| $Revision: 1382274 $<br /> |
| <b>Link:</b> |
| <a href="http://logging.apache.org/log4php/docs/appenders/file.html">Appender documentation</a><br /> |
| <b>Located at</b> <a href="source-class-LoggerAppenderFile.html#19-225" title="Go to source code">appenders/LoggerAppenderFile.php</a><br /> |
| </div> |
| |
| |
| |
| <table class="summary" id="methods"> |
| <caption>Methods summary</caption> |
| <tr data-order="getTargetFile" id="_getTargetFile"> |
| |
| <td class="attributes"><code> |
| protected |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_getTargetFile">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#68-73" title="Go to source code">getTargetFile</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Helper function which can be easily overriden by daily file appender.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Helper function which can be easily overriden by daily file appender.</p> |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="openFile" id="_openFile"> |
| |
| <td class="attributes"><code> |
| protected |
| boolean |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_openFile">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#75-114" title="Go to source code">openFile</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Acquires the target file resource, creates the destination folder if |
| necessary. Writes layout header to file.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Acquires the target file resource, creates the destination folder if |
| necessary. Writes layout header to file.</p> |
| |
| |
| |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| <code>boolean</code><br>FALSE if opening failed<br /> |
| </div> |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="write" id="_write"> |
| |
| <td class="attributes"><code> |
| protected |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_write">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#116-133" title="Go to source code">write</a>( <span>string <var>$string</var></span> )</code> |
| |
| <div class="description short"> |
| |
| <p>Writes a string to the target file. Opens file if not already open.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Writes a string to the target file. Opens file if not already open.</p> |
| |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$string</var></dt> |
| <dd><code>string</code><br>$string Data to write.</dd> |
| </dl></div> |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="writeWithLocking" id="_writeWithLocking"> |
| |
| <td class="attributes"><code> |
| protected |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_writeWithLocking">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#135-146" title="Go to source code">writeWithLocking</a>( <span>mixed <var>$string</var></span> )</code> |
| |
| <div class="description short"> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="writeWithoutLocking" id="_writeWithoutLocking"> |
| |
| <td class="attributes"><code> |
| protected |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_writeWithoutLocking">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#148-153" title="Go to source code">writeWithoutLocking</a>( <span>mixed <var>$string</var></span> )</code> |
| |
| <div class="description short"> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="activateOptions" id="_activateOptions"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_activateOptions">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#155-161" title="Go to source code">activateOptions</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Prepares the appender for logging.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Prepares the appender for logging.</p> |
| |
| <p>Derived appenders should override this method if option structure requires |
| it.</p> |
| |
| |
| |
| |
| |
| |
| |
| <h4>Overrides</h4> |
| <div class="list"><code><a href="class-LoggerAppender.html#_activateOptions">LoggerAppender::activateOptions()</a></code></div> |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="close" id="_close"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_close">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#163-170" title="Go to source code">close</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Releases any resources allocated by the appender.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Releases any resources allocated by the appender.</p> |
| |
| <p>Derived appenders should override this method to perform proper closing |
| procedures.</p> |
| |
| |
| |
| |
| |
| |
| |
| <h4>Overrides</h4> |
| <div class="list"><code><a href="class-LoggerAppender.html#_close">LoggerAppender::close()</a></code></div> |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="append" id="_append"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_append">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#172-174" title="Go to source code">append</a>( <span><code><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></code> <var>$event</var></span> )</code> |
| |
| <div class="description short"> |
| |
| <p>Forwards the logging event to the destination.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Forwards the logging event to the destination.</p> |
| |
| <p>Derived appenders should implement this method to perform actual logging.</p> |
| |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$event</var></dt> |
| <dd><code><code><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></code></code><br>$event</dd> |
| </dl></div> |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="setFile" id="_setFile"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_setFile">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#176-182" title="Go to source code">setFile</a>( <span>string <var>$file</var></span> )</code> |
| |
| <div class="description short"> |
| |
| <p>Sets the 'file' parameter.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Sets the 'file' parameter.</p> |
| |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$file</var></dt> |
| <dd><code>string</code><br>$file</dd> |
| </dl></div> |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="getFile" id="_getFile"> |
| |
| <td class="attributes"><code> |
| public |
| string |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_getFile">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#184-190" title="Go to source code">getFile</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Returns the 'file' parameter.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Returns the 'file' parameter.</p> |
| |
| |
| |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| <code>string</code><br /> |
| </div> |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="getAppend" id="_getAppend"> |
| |
| <td class="attributes"><code> |
| public |
| boolean |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_getAppend">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#192-198" title="Go to source code">getAppend</a>( )</code> |
| |
| <div class="description short"> |
| |
| <p>Returns the 'append' parameter.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Returns the 'append' parameter.</p> |
| |
| |
| |
| |
| <h4>Returns</h4> |
| <div class="list"> |
| <code>boolean</code><br /> |
| </div> |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="setAppend" id="_setAppend"> |
| |
| <td class="attributes"><code> |
| public |
| |
| |
| </code> |
| </td> |
| |
| <td class="name"><div> |
| <a class="anchor" href="#_setAppend">#</a> |
| <code><a href="source-class-LoggerAppenderFile.html#200-206" title="Go to source code">setAppend</a>( <span>boolean <var>$append</var></span> )</code> |
| |
| <div class="description short"> |
| |
| <p>Sets the 'append' parameter.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Sets the 'append' parameter.</p> |
| |
| |
| |
| <h4>Parameters</h4> |
| <div class="list"><dl> |
| <dt><var>$append</var></dt> |
| <dd><code>boolean</code><br>$append</dd> |
| </dl></div> |
| |
| |
| |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| </table> |
| |
| <table class="summary inherited"> |
| <caption>Methods inherited from <a href="class-LoggerAppender.html#methods">LoggerAppender</a></caption> |
| <tr> |
| <td><code> |
| <a href="class-LoggerAppender.html#___construct">__construct()</a>, |
| <a href="class-LoggerAppender.html#___destruct">__destruct()</a>, |
| <a href="class-LoggerAppender.html#_addFilter">addFilter()</a>, |
| <a href="class-LoggerAppender.html#_clearFilters">clearFilters()</a>, |
| <a href="class-LoggerAppender.html#_doAppend">doAppend()</a>, |
| <a href="class-LoggerAppender.html#_getDefaultLayout">getDefaultLayout()</a>, |
| <a href="class-LoggerAppender.html#_getFilter">getFilter()</a>, |
| <a href="class-LoggerAppender.html#_getFirstFilter">getFirstFilter()</a>, |
| <a href="class-LoggerAppender.html#_getLayout">getLayout()</a>, |
| <a href="class-LoggerAppender.html#_getName">getName()</a>, |
| <a href="class-LoggerAppender.html#_getThreshold">getThreshold()</a>, |
| <a href="class-LoggerAppender.html#_isAsSevereAsThreshold">isAsSevereAsThreshold()</a>, |
| <a href="class-LoggerAppender.html#_requiresLayout">requiresLayout()</a>, |
| <a href="class-LoggerAppender.html#_setLayout">setLayout()</a>, |
| <a href="class-LoggerAppender.html#_setName">setName()</a>, |
| <a href="class-LoggerAppender.html#_setThreshold">setThreshold()</a>, |
| <a href="class-LoggerAppender.html#_warn">warn()</a> |
| </code></td> |
| </tr> |
| </table> |
| <table class="summary inherited"> |
| <caption>Methods inherited from <a href="class-LoggerConfigurable.html#methods">LoggerConfigurable</a></caption> |
| <tr> |
| <td><code> |
| <a href="class-LoggerConfigurable.html#_setBoolean">setBoolean()</a>, |
| <a href="class-LoggerConfigurable.html#_setFileSize">setFileSize()</a>, |
| <a href="class-LoggerConfigurable.html#_setInteger">setInteger()</a>, |
| <a href="class-LoggerConfigurable.html#_setLevel">setLevel()</a>, |
| <a href="class-LoggerConfigurable.html#_setNumeric">setNumeric()</a>, |
| <a href="class-LoggerConfigurable.html#_setPositiveInteger">setPositiveInteger()</a>, |
| <a href="class-LoggerConfigurable.html#_setString">setString()</a> |
| </code></td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <table class="summary" id="properties"> |
| <caption>Properties summary</caption> |
| <tr data-order="locking" id="$locking"> |
| <td class="attributes"><code> |
| protected |
| boolean |
| </code></td> |
| |
| <td class="name"> |
| <a href="source-class-LoggerAppenderFile.html#39-48" title="Go to source code"><var>$locking</var></a> |
| </td> |
| <td class="value"><code><span class="php-keyword1">true</span></code></td> |
| <td class="description"><div> |
| <a href="#$locking" class="anchor">#</a> |
| |
| <div class="description short"> |
| |
| <p>If set to true, the file is locked before appending. This allows concurrent |
| access. However, appending without locking is faster so it should be used where |
| appropriate.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>If set to true, the file is locked before appending. This allows concurrent |
| access. However, appending without locking is faster so it should be used where |
| appropriate.</p> |
| |
| <p>TODO: make this a configurable parameter</p> |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="append" id="$append"> |
| <td class="attributes"><code> |
| protected |
| boolean |
| </code></td> |
| |
| <td class="name"> |
| <a href="source-class-LoggerAppenderFile.html#50-54" title="Go to source code"><var>$append</var></a> |
| </td> |
| <td class="value"><code><span class="php-keyword1">true</span></code></td> |
| <td class="description"><div> |
| <a href="#$append" class="anchor">#</a> |
| |
| <div class="description short"> |
| |
| <p>If set to true, appends to file. Otherwise overwrites it.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>If set to true, appends to file. Otherwise overwrites it.</p> |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="file" id="$file"> |
| <td class="attributes"><code> |
| protected |
| string |
| </code></td> |
| |
| <td class="name"> |
| <a href="source-class-LoggerAppenderFile.html#56-60" title="Go to source code"><var>$file</var></a> |
| </td> |
| <td class="value"><code></code></td> |
| <td class="description"><div> |
| <a href="#$file" class="anchor">#</a> |
| |
| <div class="description short"> |
| |
| <p>Path to the target file.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>Path to the target file.</p> |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| <tr data-order="fp" id="$fp"> |
| <td class="attributes"><code> |
| protected |
| resource |
| </code></td> |
| |
| <td class="name"> |
| <a href="source-class-LoggerAppenderFile.html#62-66" title="Go to source code"><var>$fp</var></a> |
| </td> |
| <td class="value"><code></code></td> |
| <td class="description"><div> |
| <a href="#$fp" class="anchor">#</a> |
| |
| <div class="description short"> |
| |
| <p>The file resource.</p> |
| |
| </div> |
| |
| <div class="description detailed hidden"> |
| |
| <p>The file resource.</p> |
| |
| |
| </div> |
| </div></td> |
| </tr> |
| </table> |
| |
| <table class="summary inherited"> |
| <caption>Properties inherited from <a href="class-LoggerAppender.html#properties">LoggerAppender</a></caption> |
| <tr> |
| <td><code> |
| <a href="class-LoggerAppender.html#$closed"><var>$closed</var></a>, |
| <a href="class-LoggerAppender.html#$filter"><var>$filter</var></a>, |
| <a href="class-LoggerAppender.html#$layout"><var>$layout</var></a>, |
| <a href="class-LoggerAppender.html#$name"><var>$name</var></a>, |
| <a href="class-LoggerAppender.html#$requiresLayout"><var>$requiresLayout</var></a>, |
| <a href="class-LoggerAppender.html#$threshold"><var>$threshold</var></a> |
| </code></td> |
| </tr> |
| </table> |
| |
| |
| |
| |
| |
| </div> |
| |
| <div id="footer"> |
| Apache log4php API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a> |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |