logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1180134 [26/43] - in /logging/site/trunk/docs/log4php: ./ apidocs/ apidocs/log4php/ apidocs/log4php/appenders/ apidocs/log4php/configurators/ apidocs/log4php/filters/ apidocs/log4php/helpers/ apidocs/log4php/layouts/ apidocs/log4php/render...
Date Fri, 07 Oct 2011 18:26:14 GMT
Modified: logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderRollingFile.php.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderRollingFile.php.html?rev=1180134&r1=1180133&r2=1180134&view=diff
==============================================================================
--- logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderRollingFile.php.html (original)
+++ logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderRollingFile.php.html Fri Oct  7 18:26:07 2011
@@ -67,22 +67,22 @@
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
-                <td class="coverBarOutline"><img src="butter.png" width="54" height="10" alt="54.55%"><img src="snow.png" width="46" height="10" alt="54.55%"></td>
+                <td class="coverBarOutline"><img src="butter.png" width="50" height="10" alt="50.00%"><img src="snow.png" width="50" height="10" alt="50.00%"></td>
               </tr>
             </table>
           </td>
-          <td class="coverPerMed">54.55%</td>
-          <td class="coverNumMed">6 / 11</td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">5 / 10</td>
           <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
-                <td class="coverBarOutline"><img src="chameleon.png" width="91" height="10" alt="91.80%"><img src="snow.png" width="9" height="10" alt="91.80%"></td>
+                <td class="coverBarOutline"><img src="chameleon.png" width="91" height="10" alt="91.53%"><img src="snow.png" width="9" height="10" alt="91.53%"></td>
               </tr>
             </table>
           </td>
-          <td class="coverPerHi">91.80%</td>
-          <td class="coverNumHi">56 / 61</td>
+          <td class="coverPerHi">91.53%</td>
+          <td class="coverNumHi">54 / 59</td>
         </tr>
 
         <tr>
@@ -102,49 +102,26 @@
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
-                <td class="coverBarOutline"><img src="butter.png" width="54" height="10" alt="54.55%"><img src="snow.png" width="46" height="10" alt="54.55%"></td>
+                <td class="coverBarOutline"><img src="butter.png" width="50" height="10" alt="50.00%"><img src="snow.png" width="50" height="10" alt="50.00%"></td>
               </tr>
             </table>
           </td>
-          <td class="coverPerMed">54.55%</td>
-          <td class="coverNumMed">6 / 11</td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">5 / 10</td>
           <td class="crap"></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
-                <td class="coverBarOutline"><img src="chameleon.png" width="91" height="10" alt="91.80%"><img src="snow.png" width="9" height="10" alt="91.80%"></td>
+                <td class="coverBarOutline"><img src="chameleon.png" width="91" height="10" alt="91.53%"><img src="snow.png" width="9" height="10" alt="91.53%"></td>
               </tr>
             </table>
           </td>
-          <td class="coverPerHi">91.80%</td>
-          <td class="coverNumHi">56 / 61</td>
+          <td class="coverPerHi">91.53%</td>
+          <td class="coverNumHi">54 / 59</td>
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#88">__destruct()</a></td>
-          <td class="coverBar" align="center" width="100">
-            <table border="0" cellspacing="0" cellpadding="1">
-              <tr>
-                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
-              </tr>
-            </table>
-          </td>
-          <td class="coverPerHi">100.00%</td>
-          <td class="coverNumHi">1 / 1</td>
-          <td class="crap">1</td>
-          <td class="coverBar" align="center" width="100">
-            <table border="0" cellspacing="0" cellpadding="1">
-              <tr>
-                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
-              </tr>
-            </table>
-          </td>
-          <td class="coverPerHi">100.00%</td>
-          <td class="coverNumHi">2 / 2</td>
-        </tr>
-
-        <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#96">getExpandedFileName()</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#92">getExpandedFileName()</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -167,7 +144,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#105">getMaximumFileSize()</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#101">getMaximumFileSize()</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -190,7 +167,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#119">rollOver()</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#115">rollOver()</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -213,7 +190,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#147">setFile($fileName)</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#143">setFile($fileName)</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -236,7 +213,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#168">setMaxBackupIndex($maxBackups)</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#164">setMaxBackupIndex($maxBackups)</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -259,7 +236,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#182">setMaximumFileSize($maxFileSize)</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#178">setMaximumFileSize($maxFileSize)</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -282,7 +259,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#199">setMaxFileSize($value)</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#195">setMaxFileSize($value)</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -305,7 +282,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#220">append(LoggerLoggingEvent $event)</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#216">append(LoggerLoggingEvent $event)</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -328,7 +305,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#243">getMaxBackupIndex()</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#239">getMaxBackupIndex()</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -351,7 +328,7 @@
         </tr>
 
         <tr>
-          <td class="coverFile" colspan="4">&nbsp;<a href="#251">getMaxFileSize()</a></td>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#247">getMaxFileSize()</a></td>
           <td class="coverBar" align="center" width="100">
             <table border="0" cellspacing="0" cellpadding="1">
               <tr>
@@ -430,7 +407,7 @@
 <span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :  *                                                                                                                                      
 <span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :  * {@example ../../examples/resources/appender_socket.properties 18}                                                                    
 <span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :  *                                                                                                                                      
-<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :  * @version $Revision: 1134244 $                                                                                                        
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :  * @version $Revision: 1166182 $                                                                                                        
 <span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :  * @package log4php                                                                                                                     
 <span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :  * @subpackage appenders                                                                                                                
 <span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :  */                                                                                                                                     
@@ -473,173 +450,169 @@
 <span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :      */                                                                                                                                 
 <span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     private $expandedFileName = null;                                                                                                   
 <span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :     public function __destruct() {                                                                                                      
-<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span><span class="lineCov">              5 :         parent::__destruct();                                                                                                           </span>
-<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span><span class="lineCov">              5 :     }                                                                                                                                   </span>
-<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      * Returns the value of the MaxBackupIndex option.                                                                                  
-<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      * @return integer                                                                                                                  
-<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :     private function getExpandedFileName() {                                                                                            
-<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span><span class="lineCov">              2 :         return $this-&gt;expandedFileName;                                                                                                 </span>
-<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :      * Get the maximum size that the output file is allowed to reach                                                                    
-<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :      * before being rolled over to backup files.                                                                                        
-<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :      * @return integer                                                                                                                  
-<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :     public function getMaximumFileSize() {                                                                                              
-<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineNoCov">              0 :         return $this-&gt;maxFileSize;                                                                                                      </span>
-<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * Implements the usual roll over behaviour.                                                                                        
-<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      * &lt;p&gt;If MaxBackupIndex is positive, then files File.1, ..., File.MaxBackupIndex -1 are renamed to File.2, ..., File.MaxBackupIndex.
-<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      * Moreover, File is renamed File.1 and closed. A new File is created to receive further log output.                                
-<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :      * &lt;p&gt;If MaxBackupIndex is equal to zero, then the File is truncated with no backup files created.                                  
-<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :      * Rollover must be called while the file is locked so that it is safe for concurrent access.                                       
-<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :     private function rollOver() {                                                                                                       
-<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :         // If maxBackups &lt;= 0, then there is no file renaming to be done.                                                               
-<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineCov">              2 :         if($this-&gt;maxBackupIndex &gt; 0) {                                                                                                 </span>
-<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span><span class="lineCov">              2 :             $fileName = $this-&gt;getExpandedFileName();                                                                                   </span>
-<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :             // Delete the oldest file, to keep Windows happy.                                                                           
-<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span><span class="lineCov">              2 :             $file = $fileName . '.' . $this-&gt;maxBackupIndex;                                                                            </span>
-<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span><span class="lineCov">              2 :             if(is_writable($file))                                                                                                      </span>
-<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineCov">              2 :                 unlink($file);                                                                                                          </span>
-<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                :             // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}                                                     
-<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span><span class="lineCov">              2 :             for($i = $this-&gt;maxBackupIndex - 1; $i &gt;= 1; $i--) {                                                                        </span>
-<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span><span class="lineCov">              2 :                 $file = $fileName . &quot;.&quot; . $i;                                                                                           </span>
-<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span><span class="lineCov">              2 :                 if(is_readable($file)) {                                                                                                </span>
-<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span><span class="lineCov">              2 :                     $target = $fileName . '.' . ($i + 1);                                                                               </span>
-<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineCov">              2 :                     rename($file, $target);                                                                                             </span>
-<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">              2 :                 }                                                                                                                       </span>
-<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span><span class="lineCov">              2 :             }                                                                                                                           </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :      * Returns the value of the MaxBackupIndex option.                                                                                  
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :      * @return integer                                                                                                                  
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     private function getExpandedFileName() {                                                                                            
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span><span class="lineCov">              2 :         return $this-&gt;expandedFileName;                                                                                                 </span>
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :      * Get the maximum size that the output file is allowed to reach                                                                    
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :      * before being rolled over to backup files.                                                                                        
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :      * @return integer                                                                                                                  
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     public function getMaximumFileSize() {                                                                                              
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span><span class="lineNoCov">              0 :         return $this-&gt;maxFileSize;                                                                                                      </span>
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :      * Implements the usual roll over behaviour.                                                                                        
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :      * &lt;p&gt;If MaxBackupIndex is positive, then files File.1, ..., File.MaxBackupIndex -1 are renamed to File.2, ..., File.MaxBackupIndex.
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :      * Moreover, File is renamed File.1 and closed. A new File is created to receive further log output.                                
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      * &lt;p&gt;If MaxBackupIndex is equal to zero, then the File is truncated with no backup files created.                                  
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      * Rollover must be called while the file is locked so that it is safe for concurrent access.                                       
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :     private function rollOver() {                                                                                                       
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :         // If maxBackups &lt;= 0, then there is no file renaming to be done.                                                               
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span><span class="lineCov">              2 :         if($this-&gt;maxBackupIndex &gt; 0) {                                                                                                 </span>
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span><span class="lineCov">              2 :             $fileName = $this-&gt;getExpandedFileName();                                                                                   </span>
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :             // Delete the oldest file, to keep Windows happy.                                                                           
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineCov">              2 :             $file = $fileName . '.' . $this-&gt;maxBackupIndex;                                                                            </span>
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span><span class="lineCov">              2 :             if(is_writable($file))                                                                                                      </span>
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span><span class="lineCov">              2 :                 unlink($file);                                                                                                          </span>
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :             // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}                                                     
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span><span class="lineCov">              2 :             for($i = $this-&gt;maxBackupIndex - 1; $i &gt;= 1; $i--) {                                                                        </span>
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineCov">              2 :                 $file = $fileName . &quot;.&quot; . $i;                                                                                           </span>
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span><span class="lineCov">              2 :                 if(is_readable($file)) {                                                                                                </span>
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineCov">              2 :                     $target = $fileName . '.' . ($i + 1);                                                                               </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span><span class="lineCov">              2 :                     rename($file, $target);                                                                                             </span>
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span><span class="lineCov">              2 :                 }                                                                                                                       </span>
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span><span class="lineCov">              2 :             }                                                                                                                           </span>
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :             // Backup the active file                                                                                                   
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">              2 :             copy($fileName, &quot;$fileName.1&quot;);                                                                                             </span>
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
 <span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :             // Backup the active file                                                                                                   
-<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineCov">              2 :             copy($fileName, &quot;$fileName.1&quot;);                                                                                             </span>
-<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
-<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :         // Truncate the active file                                                                                                     
-<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span><span class="lineCov">              2 :         ftruncate($this-&gt;fp, 0);                                                                                                        </span>
-<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span><span class="lineCov">              2 :         rewind($this-&gt;fp);                                                                                                              </span>
-<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
-<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :     public function setFile($fileName) {                                                                                                
-<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span><span class="lineCov">              3 :         $this-&gt;file = $fileName;                                                                                                        </span>
-<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :         // As LoggerAppenderFile does not create the directory, it has to exist.                                                        
-<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :         // realpath() fails if the argument does not exist so the filename is separated.                                                
-<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span><span class="lineCov">              3 :         $this-&gt;expandedFileName = realpath(dirname($fileName));                                                                         </span>
-<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span><span class="lineCov">              3 :         if ($this-&gt;expandedFileName === false) throw new Exception(&quot;Directory of $fileName does not exist!&quot;);                           </span>
-<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span><span class="lineCov">              3 :         $this-&gt;expandedFileName .= DIRECTORY_SEPARATOR . basename($fileName);                                                           </span>
-<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span><span class="lineCov">              3 :     }                                                                                                                                   </span>
-<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :      * Set the maximum number of backup files to keep around.                                                                           
-<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :      * &lt;p&gt;The &lt;b&gt;MaxBackupIndex&lt;/b&gt; option determines how many backup                                                                   
-<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :      * files are kept before the oldest is erased. This option takes                                                                    
-<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :      * a positive integer value. If set to zero, then there will be no                                                                  
-<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                :      * backup files and the log file will be truncated when it reaches                                                                  
-<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :      * MaxFileSize.                                                                                                                     
-<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :      * @param mixed $maxBackups                                                                                                         
-<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :     public function setMaxBackupIndex($maxBackups) {                                                                                    
-<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineCov">              2 :         if(is_numeric($maxBackups)) {                                                                                                   </span>
-<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span><span class="lineCov">              2 :             $this-&gt;maxBackupIndex = abs((int)$maxBackups);                                                                              </span>
-<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
-<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
-<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * Set the maximum size that the output file is allowed to reach                                                                    
-<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * before being rolled over to backup files.                                                                                        
-<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * @param mixed $maxFileSize                                                                                                        
-<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      * @see setMaxFileSize()                                                                                                            
-<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      * @deprecated                                                                                                                      
-<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :     public function setMaximumFileSize($maxFileSize) {                                                                                  
-<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span><span class="lineNoCov">              0 :         return $this-&gt;setMaxFileSize($maxFileSize);                                                                                     </span>
-<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :      * Set the maximum size that the output file is allowed to reach                                                                    
-<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :      * before being rolled over to backup files.                                                                                        
-<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :      * &lt;p&gt;In configuration files, the &lt;b&gt;maxFileSize&lt;/b&gt; option takes an                                                                
-<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :      * long integer in the range 0 - 2^63. You can specify the value                                                                    
-<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :      * with the suffixes &quot;KB&quot;, &quot;MB&quot; or &quot;GB&quot; so that the integer is                                                                      
-<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :      * interpreted being expressed respectively in kilobytes, megabytes                                                                 
-<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :      * or gigabytes. For example, the value &quot;10KB&quot; will be interpreted                                                                  
-<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :      * as 10240.                                                                                                                        
-<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :      *                                                                                                                                  
-<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :      * @param mixed $value                                                                                                              
-<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                :      * @return the actual file size set                                                                                                 
-<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :     public function setMaxFileSize($value) {                                                                                            
-<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineCov">              3 :         $maxFileSize = null;                                                                                                            </span>
-<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span><span class="lineCov">              3 :         $numpart = substr($value,0, strlen($value) -2);                                                                                 </span>
-<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineCov">              3 :         $suffix = strtoupper(substr($value, -2));                                                                                       </span>
-<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :         switch($suffix) {                                                                                                               
-<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineCov">              3 :             case 'KB': $maxFileSize = (int)((int)$numpart * 1024); break;                                                               </span>
-<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span><span class="lineCov">              1 :             case 'MB': $maxFileSize = (int)((int)$numpart * 1024 * 1024); break;                                                        </span>
-<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span><span class="lineCov">              1 :             case 'GB': $maxFileSize = (int)((int)$numpart * 1024 * 1024 * 1024); break;                                                 </span>
-<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineCov">              1 :             default:                                                                                                                    </span>
-<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span><span class="lineCov">              1 :                 if(is_numeric($value)) {                                                                                                </span>
-<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span><span class="lineCov">              1 :                     $maxFileSize = (int)$value;                                                                                         </span>
-<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span><span class="lineCov">              1 :                 }                                                                                                                       </span>
-<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span><span class="lineCov">              1 :         }                                                                                                                               </span>
-<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineCov">              3 :         if($maxFileSize !== null) {                                                                                                     </span>
-<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span><span class="lineCov">              3 :             $this-&gt;maxFileSize = abs($maxFileSize);                                                                                     </span>
-<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span><span class="lineCov">              3 :         }                                                                                                                               </span>
-<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span><span class="lineCov">              3 :         return $this-&gt;maxFileSize;                                                                                                      </span>
-<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :     public function append(LoggerLoggingEvent $event) {                                                                                 
-<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span><span class="lineCov">              2 :         if($this-&gt;fp and $this-&gt;layout !== null) {                                                                                      </span>
-<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span><span class="lineCov">              2 :             if(flock($this-&gt;fp, LOCK_EX)) {                                                                                             </span>
-<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span><span class="lineCov">              2 :                 fwrite($this-&gt;fp, $this-&gt;layout-&gt;format($event));                                                                       </span>
-<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :                 // Stats cache must be cleared, otherwise filesize() returns cached results                                             
-<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span><span class="lineCov">              2 :                 clearstatcache();                                                                                                       </span>
-<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :                 // Rollover if needed                                                                                                   
-<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineCov">              2 :                 if (filesize($this-&gt;expandedFileName) &gt; $this-&gt;maxFileSize) {                                                           </span>
-<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineCov">              2 :                     $this-&gt;rollOver();                                                                                                  </span>
-<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span><span class="lineCov">              2 :                 }                                                                                                                       </span>
-<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span><span class="lineCov">              2 :                 flock($this-&gt;fp, LOCK_UN);                                                                                              </span>
-<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span><span class="lineCov">              2 :             } else {                                                                                                                    </span>
-<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span><span class="lineNoCov">              0 :                 $this-&gt;closed = true;                                                                                                   </span>
-<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :             }                                                                                                                           
-<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span><span class="lineCov">              3 :         }                                                                                                                               </span>
-<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
-<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span>                :      * @return Returns the maximum number of backup files to keep around.                                                               
-<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :     public function getMaxBackupIndex() {                                                                                               
-<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span><span class="lineNoCov">              0 :         return $this-&gt;maxBackupIndex;                                                                                                   </span>
-<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                                         
-<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span>                :     /**                                                                                                                                 
-<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                :      * @return Returns the maximum size that the output file is allowed to reach                                                        
-<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                :      * before being rolled over to backup files.                                                                                        
-<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                :      */                                                                                                                                 
-<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :     public function getMaxFileSize() {                                                                                                  
-<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineNoCov">              0 :         return $this-&gt;maxFileSize;                                                                                                      </span>
-<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
-<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                : }                                                                                                                                       
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :         // Truncate the active file                                                                                                     
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineCov">              2 :         ftruncate($this-&gt;fp, 0);                                                                                                        </span>
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span><span class="lineCov">              2 :         rewind($this-&gt;fp);                                                                                                              </span>
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :     public function setFile($fileName) {                                                                                                
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span><span class="lineCov">              3 :         $this-&gt;file = $fileName;                                                                                                        </span>
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :         // As LoggerAppenderFile does not create the directory, it has to exist.                                                        
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :         // realpath() fails if the argument does not exist so the filename is separated.                                                
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span><span class="lineCov">              3 :         $this-&gt;expandedFileName = realpath(dirname($fileName));                                                                         </span>
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span><span class="lineCov">              3 :         if ($this-&gt;expandedFileName === false) throw new Exception(&quot;Directory of $fileName does not exist!&quot;);                           </span>
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span><span class="lineCov">              3 :         $this-&gt;expandedFileName .= DIRECTORY_SEPARATOR . basename($fileName);                                                           </span>
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineCov">              3 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :      * Set the maximum number of backup files to keep around.                                                                           
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :      * &lt;p&gt;The &lt;b&gt;MaxBackupIndex&lt;/b&gt; option determines how many backup                                                                   
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :      * files are kept before the oldest is erased. This option takes                                                                    
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :      * a positive integer value. If set to zero, then there will be no                                                                  
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :      * backup files and the log file will be truncated when it reaches                                                                  
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :      * MaxFileSize.                                                                                                                     
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :      * @param mixed $maxBackups                                                                                                         
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :     public function setMaxBackupIndex($maxBackups) {                                                                                    
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span><span class="lineCov">              2 :         if(is_numeric($maxBackups)) {                                                                                                   </span>
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineCov">              2 :             $this-&gt;maxBackupIndex = abs((int)$maxBackups);                                                                              </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :      * Set the maximum size that the output file is allowed to reach                                                                    
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * before being rolled over to backup files.                                                                                        
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      * @param mixed $maxFileSize                                                                                                        
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * @see setMaxFileSize()                                                                                                            
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * @deprecated                                                                                                                      
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :     public function setMaximumFileSize($maxFileSize) {                                                                                  
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span><span class="lineNoCov">              0 :         return $this-&gt;setMaxFileSize($maxFileSize);                                                                                     </span>
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span><span class="lineDeadCode">                :     }                                                                                                                                   </span>
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :      * Set the maximum size that the output file is allowed to reach                                                                    
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      * before being rolled over to backup files.                                                                                        
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      * &lt;p&gt;In configuration files, the &lt;b&gt;maxFileSize&lt;/b&gt; option takes an                                                                
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :      * long integer in the range 0 - 2^63. You can specify the value                                                                    
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :      * with the suffixes &quot;KB&quot;, &quot;MB&quot; or &quot;GB&quot; so that the integer is                                                                      
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :      * interpreted being expressed respectively in kilobytes, megabytes                                                                 
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :      * or gigabytes. For example, the value &quot;10KB&quot; will be interpreted                                                                  
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :      * as 10240.                                                                                                                        
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :      * @param mixed $value                                                                                                              
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :      * @return the actual file size set                                                                                                 
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :     public function setMaxFileSize($value) {                                                                                            
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span><span class="lineCov">              3 :         $maxFileSize = null;                                                                                                            </span>
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineCov">              3 :         $numpart = substr($value,0, strlen($value) -2);                                                                                 </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineCov">              3 :         $suffix = strtoupper(substr($value, -2));                                                                                       </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :         switch($suffix) {                                                                                                               
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span><span class="lineCov">              3 :             case 'KB': $maxFileSize = (int)((int)$numpart * 1024); break;                                                               </span>
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineCov">              1 :             case 'MB': $maxFileSize = (int)((int)$numpart * 1024 * 1024); break;                                                        </span>
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineCov">              1 :             case 'GB': $maxFileSize = (int)((int)$numpart * 1024 * 1024 * 1024); break;                                                 </span>
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span><span class="lineCov">              1 :             default:                                                                                                                    </span>
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineCov">              1 :                 if(is_numeric($value)) {                                                                                                </span>

[... 377 lines stripped ...]


Mime
View raw message