Modified: logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderPhp.php.html URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderPhp.php.html?rev=1180134&r1=1180133&r2=1180134&view=diff ============================================================================== --- logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderPhp.php.html (original) +++ logging/site/trunk/docs/log4php/coverage-report/appenders_LoggerAppenderPhp.php.html Fri Oct 7 18:26:07 2011 @@ -72,7 +72,7 @@ </table> </td> <td class="coverPerHi">100.00%</td> - <td class="coverNumHi">5 / 5</td> + <td class="coverNumHi">1 / 1</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"> @@ -82,92 +82,14 @@ </table> </td> <td class="coverPerHi">100.00%</td> - <td class="coverNumHi">19 / 19</td> + <td class="coverNumHi">11 / 11</td> </tr> <tr> <td class="tableHead" colspan="11"> </td> </tr> <tr> - <td class="coverItem"><b><a href="#41">LoggerAppenderPhp</a></b></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="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">5 / 5</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="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">19 / 19</td> - </tr> - - <tr> - <td class="coverFile" colspan="4"> <a href="#43">__construct($name = '')</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"> <a href="#47">__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"> <a href="#51">activateOptions()</a></td> + <td class="coverItem"><b><a href="#42">LoggerAppenderPhp</a></b></td> <td class="coverBar" align="center" width="100"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -177,20 +99,6 @@ </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"> <a href="#55">close()</a></td> <td class="coverBar" align="center" width="100"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -200,7 +108,7 @@ </td> <td class="coverPerHi">100.00%</td> <td class="coverNumHi">1 / 1</td> - <td class="crap">1</td> + <td class="crap"></td> <td class="coverBar" align="center" width="100"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -209,11 +117,11 @@ </table> </td> <td class="coverPerHi">100.00%</td> - <td class="coverNumHi">2 / 2</td> + <td class="coverNumHi">11 / 11</td> </tr> <tr> - <td class="coverFile" colspan="4"> <a href="#59">append(LoggerLoggingEvent $event)</a></td> + <td class="coverFile" colspan="4"> <a href="#44">append(LoggerLoggingEvent $event)</a></td> <td class="coverBar" align="center" width="100"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -273,52 +181,37 @@ <span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23"> 23</a> </span> : * <span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24"> 24</a> </span> : * This appender has no configurable parameters. <span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25"> 25</a> </span> : * -<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26"> 26</a> </span> : * <p>Levels are mapped as follows:</p> -<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27"> 27</a> </span> : * - <b>level &lt; WARN</b> mapped to E_USER_NOTICE -<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28"> 28</a> </span> : * - <b>WARN &lt;= level &lt; ERROR</b> mapped to E_USER_WARNING -<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29"> 29</a> </span> : * - <b>level &gt;= ERROR</b> mapped to E_USER_ERROR -<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30"> 30</a> </span> : * -<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31"> 31</a> </span> : * An example: -<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32"> 32</a> </span> : * -<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33"> 33</a> </span> : * {@example ../../examples/php/appender_php.php 19} -<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34"> 34</a> </span> : * -<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35"> 35</a> </span> : * {@example ../../examples/resources/appender_php.properties 18} -<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36"> 36</a> </span> : * -<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37"> 37</a> </span> : * @version $Revision: 1062665 $ -<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38"> 38</a> </span> : * @package log4php -<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39"> 39</a> </span> : * @subpackage appenders -<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40"> 40</a> </span> : */ -<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41"> 41</a> </span><span class="lineCov"> 1 : class LoggerAppenderPhp extends LoggerAppender { </span> -<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> : public function __construct($name = '') { -<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44"> 44</a> </span><span class="lineCov"> 2 : parent::__construct($name); </span> -<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45"> 45</a> </span><span class="lineCov"> 2 : } </span> -<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46"> 46</a> </span> : -<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47"> 47</a> </span> : public function __destruct() { -<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48"> 48</a> </span><span class="lineCov"> 2 : $this->close(); </span> -<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49"> 49</a> </span><span class="lineCov"> 2 : } </span> -<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50"> 50</a> </span> : -<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51"> 51</a> </span> : public function activateOptions() { -<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52"> 52</a> </span><span class="lineCov"> 1 : $this->closed = false; </span> -<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53"> 53</a> </span><span class="lineCov"> 1 : } </span> -<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54"> 54</a> </span> : -<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55"> 55</a> </span> : public function close() { -<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56"> 56</a> </span><span class="lineCov"> 2 : $this->closed = true; </span> -<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57"> 57</a> </span><span class="lineCov"> 2 : } </span> -<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58"> 58</a> </span> : -<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59"> 59</a> </span> : public function append(LoggerLoggingEvent $event) { -<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60"> 60</a> </span><span class="lineCov"> 1 : if($this->layout !== null) { </span> -<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61"> 61</a> </span><span class="lineCov"> 1 : $level = $event->getLevel(); </span> -<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62"> 62</a> </span><span class="lineCov"> 1 : if($level->isGreaterOrEqual(LoggerLevel::getLevelError())) { </span> -<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63"> 63</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_ERROR); </span> -<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64"> 64</a> </span><span class="lineCov"> 1 : } else if ($level->isGreaterOrEqual(LoggerLevel::getLevelWarn())) { </span> -<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65"> 65</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_WARNING); </span> -<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66"> 66</a> </span><span class="lineCov"> 1 : } else { </span> -<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67"> 67</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_NOTICE); </span> -<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68"> 68</a> </span> : } -<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69"> 69</a> </span><span class="lineCov"> 1 : } </span> -<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70"> 70</a> </span><span class="lineCov"> 1 : } </span> -<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71"> 71</a> </span> : } +<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26"> 26</a> </span> : * Levels are mapped as follows: +<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27"> 27</a> </span> : * +<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28"> 28</a> </span> : * - <b>level < WARN</b> mapped to E_USER_NOTICE +<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29"> 29</a> </span> : * - <b>WARN <= level < ERROR</b> mapped to E_USER_WARNING +<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30"> 30</a> </span> : * - <b>level >= ERROR</b> mapped to E_USER_ERROR +<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31"> 31</a> </span> : * +<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32"> 32</a> </span> : * An example: +<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33"> 33</a> </span> : * +<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34"> 34</a> </span> : * {@example ../../examples/php/appender_php.php 19} +<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35"> 35</a> </span> : * +<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36"> 36</a> </span> : * {@example ../../examples/resources/appender_php.properties 18} +<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37"> 37</a> </span> : * +<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38"> 38</a> </span> : * @version $Revision: 1166182 $ +<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39"> 39</a> </span> : * @package log4php +<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40"> 40</a> </span> : * @subpackage appenders +<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41"> 41</a> </span> : */ +<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42"> 42</a> </span><span class="lineCov"> 1 : class LoggerAppenderPhp extends LoggerAppender { </span> +<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43"> 43</a> </span> : +<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44"> 44</a> </span> : public function append(LoggerLoggingEvent $event) { +<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45"> 45</a> </span><span class="lineCov"> 1 : if($this->layout !== null) { </span> +<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46"> 46</a> </span><span class="lineCov"> 1 : $level = $event->getLevel(); </span> +<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47"> 47</a> </span><span class="lineCov"> 1 : if($level->isGreaterOrEqual(LoggerLevel::getLevelError())) { </span> +<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48"> 48</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_ERROR); </span> +<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49"> 49</a> </span><span class="lineCov"> 1 : } else if ($level->isGreaterOrEqual(LoggerLevel::getLevelWarn())) { </span> +<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50"> 50</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_WARNING); </span> +<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51"> 51</a> </span><span class="lineCov"> 1 : } else { </span> +<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52"> 52</a> </span><span class="lineCov"> 1 : trigger_error($this->layout->format($event), E_USER_NOTICE); </span> +<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53"> 53</a> </span> : } +<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54"> 54</a> </span><span class="lineCov"> 1 : } </span> +<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55"> 55</a> </span><span class="lineCov"> 1 : } </span> +<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56"> 56</a> </span> : } </pre> </td> @@ -327,7 +220,7 @@ <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr> - <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.0.4</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.6</a> and PHPUnit 3.5.14 at Tue Aug 30 13:23:52 BST 2011.</td></tr> + <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.0.5</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.3</a> and PHPUnit 3.5.15 at Fri Oct 7 19:06:00 BST 2011.</td></tr> </table> <br /> @@ -337,98 +230,58 @@ $E = YAHOO.util.Event; YAHOO.namespace("phpunit.container"); YAHOO.phpunit.container.panelsData = { - "panel41": { - "header": "1 test covers line 41", + "panel42": { + "header": "1 test covers line 42", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li></ul>", "footer": "" }, - "panel44": { - "header": "2 tests cover line 44", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, "panel45": { - "header": "2 tests cover line 45", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel48": { - "header": "2 tests cover line 48", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel49": { - "header": "2 tests cover line 49", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel52": { - "header": "1 test covers line 52", + "header": "1 test covers line 45", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel53": { - "header": "1 test covers line 53", + "panel46": { + "header": "1 test covers line 46", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel56": { - "header": "2 tests cover line 56", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel57": { - "header": "2 tests cover line 57", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testRequiresLayout</li><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel60": { - "header": "1 test covers line 60", + "panel47": { + "header": "1 test covers line 47", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel61": { - "header": "1 test covers line 61", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel62": { - "header": "1 test covers line 62", - "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", - "footer": "" - }, - "panel63": { - "header": "1 test covers line 63", + "panel48": { + "header": "1 test covers line 48", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel64": { - "header": "1 test covers line 64", + "panel49": { + "header": "1 test covers line 49", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel65": { - "header": "1 test covers line 65", + "panel50": { + "header": "1 test covers line 50", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel66": { - "header": "1 test covers line 66", + "panel51": { + "header": "1 test covers line 51", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel67": { - "header": "1 test covers line 67", + "panel52": { + "header": "1 test covers line 52", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel69": { - "header": "1 test covers line 69", + "panel54": { + "header": "1 test covers line 54", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" }, - "panel70": { - "header": "1 test covers line 70", + "panel55": { + "header": "1 test covers line 55", "body": "<ul><li class=\"testPassed\">LoggerAppenderPhpTest::testPhp</li></ul>", "footer": "" },