blob: b45f39803193253aac8af27dd7ca45bf92cb14b6 [file] [log] [blame]
<!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 LoggerAppenderRollingFile | 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><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 class="active"><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 LoggerAppenderRollingFile</h1>
<div class="description">
<p>LoggerAppenderRollingFile writes logging events to a specified file. The file
is rolled over after a specified size has been reached.</p>
<p>This appender uses a layout.</p>
<h1>Configurable parameters:</h1>
<ul>
<li><strong>file</strong> - Path to the target file.</li>
<li><strong>append</strong> - If set to true, the appender will append to the
file, otherwise the file contents will be overwritten.</li>
<li><strong>maxBackupIndex</strong> - Maximum number of backup files to keep.
Default is 1.</li>
<li><strong>maxFileSize</strong> - Maximum allowed file size (in bytes) before
rolling over. Suffixes "KB", "MB" and "GB" are allowed. 10KB = 10240 bytes, etc.
Default is 10M.</li>
<li><strong>compress</strong> - If set to true, rolled-over files will be
compressed. Requires the zlib extension.</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" />
<a href="class-LoggerAppenderFile.html"><span>LoggerAppenderFile</span></a>
</dd>
<dd style="padding-left:90px">
<img src="resources/inherit.png" alt="Extended by" />
<b><span>LoggerAppenderRollingFile</span></b>
</dd>
</dl>
<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: 1394975 $<br />
<b>Link:</b>
<a href="http://logging.apache.org/log4php/docs/appenders/rolling-file.html">Appender documentation</a><br />
<b>Located at</b> <a href="source-class-LoggerAppenderRollingFile.html#21-305" title="Go to source code">appenders/LoggerAppenderRollingFile.php</a><br />
</div>
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="getMaximumFileSize" id="_getMaximumFileSize">
<td class="attributes"><code>
public
integer
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getMaximumFileSize">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#90-97" title="Go to source code">getMaximumFileSize</a>( )</code>
<div class="description short">
<p>Get the maximum size that the output file is allowed to reach before being
rolled over to backup files.</p>
</div>
<div class="description detailed hidden">
<p>Get the maximum size that the output file is allowed to reach before being
rolled over to backup files.</p>
<h4>Returns</h4>
<div class="list">
<code>integer</code><br />
</div>
</div>
</div></td>
</tr>
<tr data-order="__construct" id="___construct">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#99-104" title="Go to source code">__construct</a>( <span>string <var>$name</var> = <span class="php-quote">''</span></span> )</code>
<div class="description short">
<p>Default constructor.</p>
</div>
<div class="description detailed hidden">
<p>Default constructor.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$name</var></dt>
<dd><code>string</code><br>$name Appender name</dd>
</dl></div>
<h4>Overrides</h4>
<div class="list"><code><a href="class-LoggerAppender.html#___construct">LoggerAppender::__construct()</a></code></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-LoggerAppenderRollingFile.html#193-237" 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>
<h4>Overrides</h4>
<div class="list"><code><a href="class-LoggerAppenderFile.html#_write">LoggerAppenderFile::write()</a></code></div>
</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-LoggerAppenderRollingFile.html#239-246" 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-LoggerAppenderFile.html#_activateOptions">LoggerAppenderFile::activateOptions()</a></code></div>
</div>
</div></td>
</tr>
<tr data-order="setMaxBackupIndex" id="_setMaxBackupIndex">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setMaxBackupIndex">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#248-254" title="Go to source code">setMaxBackupIndex</a>( <span>integer <var>$maxBackupIndex</var></span> )</code>
<div class="description short">
<p>Set the 'maxBackupIndex' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Set the 'maxBackupIndex' parameter.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$maxBackupIndex</var></dt>
<dd><code>integer</code><br>$maxBackupIndex</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getMaxBackupIndex" id="_getMaxBackupIndex">
<td class="attributes"><code>
public
integer
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getMaxBackupIndex">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#256-262" title="Go to source code">getMaxBackupIndex</a>( )</code>
<div class="description short">
<p>Returns the 'maxBackupIndex' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Returns the 'maxBackupIndex' parameter.</p>
<h4>Returns</h4>
<div class="list">
<code>integer</code><br />
</div>
</div>
</div></td>
</tr>
<tr data-order="setMaxFileSize" id="_setMaxFileSize">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setMaxFileSize">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#264-270" title="Go to source code">setMaxFileSize</a>( <span>mixed <var>$maxFileSize</var></span> )</code>
<div class="description short">
<p>Set the 'maxFileSize' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Set the 'maxFileSize' parameter.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$maxFileSize</var></dt>
<dd><code>mixed</code><br>$maxFileSize</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getMaxFileSize" id="_getMaxFileSize">
<td class="attributes"><code>
public
integer
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getMaxFileSize">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#272-278" title="Go to source code">getMaxFileSize</a>( )</code>
<div class="description short">
<p>Returns the 'maxFileSize' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Returns the 'maxFileSize' parameter.</p>
<h4>Returns</h4>
<div class="list">
<code>integer</code><br />
</div>
</div>
</div></td>
</tr>
<tr data-order="setCompress" id="_setCompress">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_setCompress">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#290-296" title="Go to source code">setCompress</a>( <span>boolean <var>$compress</var></span> )</code>
<div class="description short">
<p>Sets the 'compress' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Sets the 'compress' parameter.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$compress</var></dt>
<dd><code>boolean</code><br>$compress</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getCompress" id="_getCompress">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getCompress">#</a>
<code><a href="source-class-LoggerAppenderRollingFile.html#298-304" title="Go to source code">getCompress</a>( )</code>
<div class="description short">
<p>Returns the 'compress' parameter.</p>
</div>
<div class="description detailed hidden">
<p>Returns the 'compress' parameter.</p>
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Methods inherited from <a href="class-LoggerAppenderFile.html#methods">LoggerAppenderFile</a></caption>
<tr>
<td><code>
<a href="class-LoggerAppenderFile.html#_append">append()</a>,
<a href="class-LoggerAppenderFile.html#_close">close()</a>,
<a href="class-LoggerAppenderFile.html#_getAppend">getAppend()</a>,
<a href="class-LoggerAppenderFile.html#_getFile">getFile()</a>,
<a href="class-LoggerAppenderFile.html#_getTargetFile">getTargetFile()</a>,
<a href="class-LoggerAppenderFile.html#_openFile">openFile()</a>,
<a href="class-LoggerAppenderFile.html#_setAppend">setAppend()</a>,
<a href="class-LoggerAppenderFile.html#_setFile">setFile()</a>,
<a href="class-LoggerAppenderFile.html#_writeWithLocking">writeWithLocking()</a>,
<a href="class-LoggerAppenderFile.html#_writeWithoutLocking">writeWithoutLocking()</a>
</code></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#___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="constants">
<caption>Constants summary</caption>
<tr data-order="COMPRESS_CHUNK_SIZE" id="COMPRESS_CHUNK_SIZE">
<td class="attributes"><code>integer</code></td>
<td class="name"><code>
<a href="source-class-LoggerAppenderRollingFile.html#47-48" title="Go to source code"><b>COMPRESS_CHUNK_SIZE</b></a>
</code></td>
<td class="value"><code><span class="php-num">102400</span></code></td>
<td class="description"><div>
<a href="#COMPRESS_CHUNK_SIZE" class="anchor">#</a>
<div class="description short">
<p>Compressing backup files is done in chunks, this determines how large.</p>
</div>
<div class="description detailed hidden">
<p>Compressing backup files is done in chunks, this determines how large.</p>
</div>
</div></td>
</tr>
</table>
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="maxFileSize" id="$maxFileSize">
<td class="attributes"><code>
protected
integer
</code></td>
<td class="name">
<a href="source-class-LoggerAppenderRollingFile.html#50-59" title="Go to source code"><var>$maxFileSize</var></a>
</td>
<td class="value"><code><span class="php-num">10485760</span></code></td>
<td class="description"><div>
<a href="#$maxFileSize" class="anchor">#</a>
<div class="description short">
<p>The maximum size (in bytes) that the output file is allowed to reach before
being rolled over to backup files.</p>
</div>
<div class="description detailed hidden">
<p>The maximum size (in bytes) that the output file is allowed to reach before
being rolled over to backup files.</p>
<p>The default maximum file size is 10MB (10485760 bytes). Maximum value for
this option may depend on the file system.</p>
</div>
</div></td>
</tr>
<tr data-order="maxBackupIndex" id="$maxBackupIndex">
<td class="attributes"><code>
protected
integer
</code></td>
<td class="name">
<a href="source-class-LoggerAppenderRollingFile.html#61-73" title="Go to source code"><var>$maxBackupIndex</var></a>
</td>
<td class="value"><code><span class="php-num">1</span></code></td>
<td class="description"><div>
<a href="#$maxBackupIndex" class="anchor">#</a>
<div class="description short">
<p>Set the maximum number of backup files to keep around.</p>
</div>
<div class="description detailed hidden">
<p>Set the maximum number of backup files to keep around.</p>
<p>Determines how many backup files are kept before the oldest is erased. This
option takes a positive integer value. If set to zero, then there will be no
backup files and the log file will be truncated when it reaches
<var>maxFileSize</var>.</p>
<p>There is one backup file by default.</p>
</div>
</div></td>
</tr>
<tr data-order="compress" id="$compress">
<td class="attributes"><code>
protected
boolean
</code></td>
<td class="name">
<a href="source-class-LoggerAppenderRollingFile.html#75-80" title="Go to source code"><var>$compress</var></a>
</td>
<td class="value"><code><span class="php-keyword1">false</span></code></td>
<td class="description"><div>
<a href="#$compress" class="anchor">#</a>
<div class="description short">
<p>The <var>compress</var> parameter determindes the compression with zlib. If
set to true, the rollover files are compressed and saved with the .gz
extension.</p>
</div>
<div class="description detailed hidden">
<p>The <var>compress</var> parameter determindes the compression with zlib. If
set to true, the rollover files are compressed and saved with the .gz
extension.</p>
</div>
</div></td>
</tr>
</table>
<table class="summary inherited">
<caption>Properties inherited from <a href="class-LoggerAppenderFile.html#properties">LoggerAppenderFile</a></caption>
<tr>
<td><code>
<a href="class-LoggerAppenderFile.html#$append"><var>$append</var></a>,
<a href="class-LoggerAppenderFile.html#$file"><var>$file</var></a>,
<a href="class-LoggerAppenderFile.html#$fp"><var>$fp</var></a>,
<a href="class-LoggerAppenderFile.html#$locking"><var>$locking</var></a>
</code></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>