You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/03/05 19:53:10 UTC

svn commit: r853148 [18/36] - in /websites/production/commons/content/proper/commons-logging/javadocs: api-1.0.4/ api-1.0.4/api/ api-1.0.4/apidocs/ api-1.0.4/apidocs/org/ api-1.0.4/apidocs/org/apache/ api-1.0.4/apidocs/org/apache/commons/ api-1.0.4/api...

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>AvalonLoggerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * </em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * </em>
+<a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> * </em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> */</em> 
+<a name="16" href="#16">16</a>  <strong>package</strong> <a href="../../../../../org/apache/commons/logging/avalon/package-summary.html">org.apache.commons.logging.avalon</a>;
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  <strong>import</strong> org.apache.avalon.framework.logger.ConsoleLogger;
+<a name="19" href="#19">19</a>  <strong>import</strong> org.apache.commons.logging.impl.AvalonLogger;
+<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.commons.logging.AbstractLogTest;
+<a name="22" href="#22">22</a>  
+<a name="23" href="#23">23</a>  <strong>import</strong> junit.framework.Test;
+<a name="24" href="#24">24</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  <em>/**<em>*</em></em>
+<a name="27" href="#27">27</a>  <em> * @author &lt;a href="<a href="mailto:neeme@apache.org" target="alexandria_uri">mailto:neeme@apache.org</a>">Neeme Praks&lt;/a></em>
+<a name="28" href="#28">28</a>  <em> * @version $Revision$ $Date: 2004/02/28 21:46:45 $</em>
+<a name="29" href="#29">29</a>  <em> */</em>
+<a name="30" href="#30">30</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/commons/logging/avalon/AvalonLoggerTest.html">AvalonLoggerTest</a> <strong>extends</strong> <a href="../../../../../org/apache/commons/logging/AbstractLogTest.html">AbstractLogTest</a> {
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>      <strong>public</strong> <strong>static</strong> <strong>void</strong> main(String[] args) {
+<a name="33" href="#33">33</a>          String[] testCaseName = { AvalonLoggerTest.<strong>class</strong>.getName() };
+<a name="34" href="#34">34</a>          junit.textui.TestRunner.main(testCaseName);	
+<a name="35" href="#35">35</a>      }
+<a name="36" href="#36">36</a>  
+<a name="37" href="#37">37</a>      <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="38" href="#38">38</a>          TestSuite suite = <strong>new</strong> TestSuite();
+<a name="39" href="#39">39</a>          suite.addTestSuite(AvalonLoggerTest.<strong>class</strong>);
+<a name="40" href="#40">40</a>          <strong>return</strong> suite;
+<a name="41" href="#41">41</a>      }
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>      <strong>public</strong> <a href="../../../../../org/apache/commons/logging/avalon/AvalonLoggerTest.html">AvalonLoggerTest</a>(String testName) {
+<a name="44" href="#44">44</a>  		<strong>super</strong>(testName);
+<a name="45" href="#45">45</a>  	}
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <strong>public</strong> Log getLogObject() {
+<a name="48" href="#48">48</a>          Log log = <strong>new</strong> AvalonLogger(<strong>new</strong> ConsoleLogger());
+<a name="49" href="#49">49</a>  		<strong>return</strong> log;
+<a name="50" href="#50">50</a>  	}
+<a name="51" href="#51">51</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/AvalonLoggerTest.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,27 @@
+
+
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml lang="en">
+    <head>
+      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+      <title>Logging 1.0.4 Reference Package org.apache.commons.logging.avalon</title>
+      <link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
+    </head>
+    <body>
+
+      <h3>
+        <a href="package-summary.html" target="classFrame">org.apache.commons.logging.avalon</a>
+      </h3>
+
+      <h3>Classes</h3>
+
+      <ul>
+        
+          <li>
+            <a href="AvalonLoggerTest.html" target="classFrame">AvalonLoggerTest</a>
+          </li>
+        
+      </ul>
+
+    </body>
+  </html>

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-frame.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,102 @@
+
+
+  
+
+  
+    
+
+    
+
+    
+
+  
+      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+      <html xmlns="http://www.w3.org/1999/xhtml lang="en">
+        <head>
+          <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+          <title>Logging 1.0.4 Reference Package </title>
+          <link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
+        </head>
+        <body>
+
+          
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+      
+      <h2>Package org.apache.commons.logging.avalon</h2>
+
+      <table class="summary">
+        <thead>
+          <tr>
+            <th>Class Summary</th>
+          </tr>
+        </thead>
+
+        <tbody>
+          
+            <tr>
+              <td>
+                <a href="AvalonLoggerTest.html" target="classFrame">AvalonLoggerTest</a>
+              </td>
+            </tr>
+          
+        </tbody>
+      </table>
+
+    
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+    
+
+          <hr></hr>
+
+          Copyright &copy; 2001-2004 The Apache Software Foundation. All Rights Reserved.
+        </body>
+      </html>
+    

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/avalon/package-summary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,315 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>CustomConfigTestCase xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * </em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * </em>
+<a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> * </em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> */</em> 
+<a name="16" href="#16">16</a>  
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../org/apache/commons/logging/jdk14/package-summary.html">org.apache.commons.logging.jdk14</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> java.io.InputStream;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.util.Iterator;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.util.logging.Handler;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.util.logging.Level;
+<a name="24" href="#24">24</a>  <strong>import</strong> java.util.logging.LogManager;
+<a name="25" href="#25">25</a>  <strong>import</strong> java.util.logging.LogRecord;
+<a name="26" href="#26">26</a>  <strong>import</strong> java.util.logging.Logger;
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>  <strong>import</strong> junit.framework.Test;
+<a name="29" href="#29">29</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="30" href="#30">30</a>  
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>  <em>/**<em>*</em></em>
+<a name="33" href="#33">33</a>  <em> * &lt;p>TestCase for JDK 1.4 logging when running on a JDK 1.4 system with</em>
+<a name="34" href="#34">34</a>  <em> * custom configuration, so that JDK 1.4 should be selected and an appropriate</em>
+<a name="35" href="#35">35</a>  <em> * logger configured per the configuration properties.&lt;/p></em>
+<a name="36" href="#36">36</a>  <em> *</em>
+<a name="37" href="#37">37</a>  <em> * @author Craig R. McClanahan</em>
+<a name="38" href="#38">38</a>  <em> * @version $Revision$ $Date: 2004/02/28 21:46:45 $</em>
+<a name="39" href="#39">39</a>  <em> */</em>
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/commons/logging/jdk14/CustomConfigTestCase.html">CustomConfigTestCase</a> <strong>extends</strong> <a href="../../../../../org/apache/commons/logging/jdk14/DefaultConfigTestCase.html">DefaultConfigTestCase</a> {
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <em class="comment">// ----------------------------------------------------------- Constructors</em>
+<a name="45" href="#45">45</a>  
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <em>/**<em>*</em></em>
+<a name="48" href="#48">48</a>  <em>     * &lt;p>Construct a new instance of this test case.&lt;/p></em>
+<a name="49" href="#49">49</a>  <em>     *</em>
+<a name="50" href="#50">50</a>  <em>     * @param name Name of the test case</em>
+<a name="51" href="#51">51</a>  <em>     */</em>
+<a name="52" href="#52">52</a>      <strong>public</strong> <a href="../../../../../org/apache/commons/logging/jdk14/CustomConfigTestCase.html">CustomConfigTestCase</a>(String name) {
+<a name="53" href="#53">53</a>          <strong>super</strong>(name);
+<a name="54" href="#54">54</a>      }
+<a name="55" href="#55">55</a>  
+<a name="56" href="#56">56</a>  
+<a name="57" href="#57">57</a>      <em class="comment">// ----------------------------------------------------- Instance Variables</em>
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>      <em>/**<em>*</em></em>
+<a name="61" href="#61">61</a>  <em>     * &lt;p>The customized &lt;code>Handler&lt;/code> we will be using.&lt;/p></em>
+<a name="62" href="#62">62</a>  <em>     */</em>
+<a name="63" href="#63">63</a>      <strong>protected</strong> <a href="../../../../../org/apache/commons/logging/jdk14/TestHandler.html">TestHandler</a> handler = <strong>null</strong>;
+<a name="64" href="#64">64</a>  
+<a name="65" href="#65">65</a>  
+<a name="66" href="#66">66</a>      <em>/**<em>*</em></em>
+<a name="67" href="#67">67</a>  <em>     * &lt;p>The underlying &lt;code>Handler&lt;/code>s we will be using.&lt;/p></em>
+<a name="68" href="#68">68</a>  <em>     */</em>
+<a name="69" href="#69">69</a>      <strong>protected</strong> Handler handlers[] = <strong>null</strong>;
+<a name="70" href="#70">70</a>  
+<a name="71" href="#71">71</a>  
+<a name="72" href="#72">72</a>      <em>/**<em>*</em></em>
+<a name="73" href="#73">73</a>  <em>     * &lt;p>The underlying &lt;code>Logger&lt;/code> we will be using.&lt;/p></em>
+<a name="74" href="#74">74</a>  <em>     */</em>
+<a name="75" href="#75">75</a>      <strong>protected</strong> Logger logger = <strong>null</strong>;
+<a name="76" href="#76">76</a>  
+<a name="77" href="#77">77</a>  
+<a name="78" href="#78">78</a>      <em>/**<em>*</em></em>
+<a name="79" href="#79">79</a>  <em>     * &lt;p>The underlying &lt;code>LogManager&lt;/code> we will be using.&lt;/p></em>
+<a name="80" href="#80">80</a>  <em>     */</em>
+<a name="81" href="#81">81</a>      <strong>protected</strong> LogManager manager = <strong>null</strong>;
+<a name="82" href="#82">82</a>  
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>      <em>/**<em>*</em></em>
+<a name="85" href="#85">85</a>  <em>     * &lt;p>The message levels that should have been logged.&lt;/p></em>
+<a name="86" href="#86">86</a>  <em>     */</em>
+<a name="87" href="#87">87</a>      <strong>protected</strong> Level testLevels[] =
+<a name="88" href="#88">88</a>      { Level.FINE, Level.INFO, Level.WARNING, Level.SEVERE, Level.SEVERE };
+<a name="89" href="#89">89</a>  
+<a name="90" href="#90">90</a>  
+<a name="91" href="#91">91</a>      <em>/**<em>*</em></em>
+<a name="92" href="#92">92</a>  <em>     * &lt;p>The message strings that should have been logged.&lt;/p></em>
+<a name="93" href="#93">93</a>  <em>     */</em>
+<a name="94" href="#94">94</a>      <strong>protected</strong> String testMessages[] =
+<a name="95" href="#95">95</a>      { <span class="string">"debug"</span>, <span class="string">"info"</span>, <span class="string">"warn"</span>, <span class="string">"error"</span>, <span class="string">"fatal"</span> };
+<a name="96" href="#96">96</a>  
+<a name="97" href="#97">97</a>  
+<a name="98" href="#98">98</a>      <em class="comment">// ------------------------------------------- JUnit Infrastructure Methods</em>
+<a name="99" href="#99">99</a>  
+<a name="100" href="#100">100</a> 
+<a name="101" href="#101">101</a>     <em>/**<em>*</em></em>
+<a name="102" href="#102">102</a> <em>     * Set up instance variables required by this test case.</em>
+<a name="103" href="#103">103</a> <em>     */</em>
+<a name="104" href="#104">104</a>     <strong>public</strong> <strong>void</strong> setUp() throws Exception {
+<a name="105" href="#105">105</a>         setUpManager
+<a name="106" href="#106">106</a>             (<span class="string">"org/apache/commons/logging/jdk14/CustomConfig.properties"</span>);
+<a name="107" href="#107">107</a>         setUpLogger(<span class="string">"TestLogger"</span>);
+<a name="108" href="#108">108</a>         setUpHandlers();
+<a name="109" href="#109">109</a>         setUpFactory();
+<a name="110" href="#110">110</a>         setUpLog(<span class="string">"TestLogger"</span>);
+<a name="111" href="#111">111</a>     }
+<a name="112" href="#112">112</a> 
+<a name="113" href="#113">113</a> 
+<a name="114" href="#114">114</a>     <em>/**<em>*</em></em>
+<a name="115" href="#115">115</a> <em>     * Return the tests included in this test suite.</em>
+<a name="116" href="#116">116</a> <em>     */</em>
+<a name="117" href="#117">117</a>     <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="118" href="#118">118</a>         <strong>return</strong> (<strong>new</strong> TestSuite(CustomConfigTestCase.<strong>class</strong>));
+<a name="119" href="#119">119</a>     }
+<a name="120" href="#120">120</a> 
+<a name="121" href="#121">121</a>     <em>/**<em>*</em></em>
+<a name="122" href="#122">122</a> <em>     * Tear down instance variables required by this test case.</em>
+<a name="123" href="#123">123</a> <em>     */</em>
+<a name="124" href="#124">124</a>     <strong>public</strong> <strong>void</strong> tearDown() {
+<a name="125" href="#125">125</a>         <strong>super</strong>.tearDown();
+<a name="126" href="#126">126</a>         handlers = <strong>null</strong>;
+<a name="127" href="#127">127</a>         logger = <strong>null</strong>;
+<a name="128" href="#128">128</a>         manager = <strong>null</strong>;
+<a name="129" href="#129">129</a>     }
+<a name="130" href="#130">130</a> 
+<a name="131" href="#131">131</a> 
+<a name="132" href="#132">132</a>     <em class="comment">// ----------------------------------------------------------- Test Methods</em>
+<a name="133" href="#133">133</a> 
+<a name="134" href="#134">134</a> 
+<a name="135" href="#135">135</a>     <em class="comment">// Test logging message strings with exceptions</em>
+<a name="136" href="#136">136</a>     <strong>public</strong> <strong>void</strong> testExceptionMessages() throws Exception {
+<a name="137" href="#137">137</a> 
+<a name="138" href="#138">138</a>         logExceptionMessages();
+<a name="139" href="#139">139</a>         checkLogRecords(<strong>true</strong>);
+<a name="140" href="#140">140</a> 
+<a name="141" href="#141">141</a>     }
+<a name="142" href="#142">142</a> 
+<a name="143" href="#143">143</a> 
+<a name="144" href="#144">144</a>     <em class="comment">// Test logging plain message strings</em>
+<a name="145" href="#145">145</a>     <strong>public</strong> <strong>void</strong> testPlainMessages() throws Exception {
+<a name="146" href="#146">146</a> 
+<a name="147" href="#147">147</a>         logPlainMessages();
+<a name="148" href="#148">148</a>         checkLogRecords(false);
+<a name="149" href="#149">149</a> 
+<a name="150" href="#150">150</a>     }
+<a name="151" href="#151">151</a> 
+<a name="152" href="#152">152</a> 
+<a name="153" href="#153">153</a>     <em class="comment">// Test pristine Handlers instances</em>
+<a name="154" href="#154">154</a>     <strong>public</strong> <strong>void</strong> testPristineHandlers() {
+<a name="155" href="#155">155</a> 
+<a name="156" href="#156">156</a>         assertNotNull(handlers);
+<a name="157" href="#157">157</a>         assertEquals(1, handlers.length);
+<a name="158" href="#158">158</a>         assertTrue(handlers[0] instanceof <a href="../../../../../org/apache/commons/logging/jdk14/TestHandler.html">TestHandler</a>);
+<a name="159" href="#159">159</a>         assertNotNull(handler);
+<a name="160" href="#160">160</a> 
+<a name="161" href="#161">161</a>     }
+<a name="162" href="#162">162</a> 
+<a name="163" href="#163">163</a> 
+<a name="164" href="#164">164</a>     <em class="comment">// Test pristine Logger instance</em>
+<a name="165" href="#165">165</a>     <strong>public</strong> <strong>void</strong> testPristineLogger() {
+<a name="166" href="#166">166</a> 
+<a name="167" href="#167">167</a>         assertNotNull(<span class="string">"Logger exists"</span>, logger);
+<a name="168" href="#168">168</a>         assertEquals(<span class="string">"Logger name"</span>, <span class="string">"TestLogger"</span>, logger.getName());
+<a name="169" href="#169">169</a> 
+<a name="170" href="#170">170</a>         <em class="comment">// Assert which logging levels have been enabled</em>
+<a name="171" href="#171">171</a>         assertTrue(logger.isLoggable(Level.SEVERE));
+<a name="172" href="#172">172</a>         assertTrue(logger.isLoggable(Level.WARNING));
+<a name="173" href="#173">173</a>         assertTrue(logger.isLoggable(Level.INFO));
+<a name="174" href="#174">174</a>         assertTrue(logger.isLoggable(Level.CONFIG));
+<a name="175" href="#175">175</a>         assertTrue(logger.isLoggable(Level.FINE));
+<a name="176" href="#176">176</a>         assertTrue(!logger.isLoggable(Level.FINER));
+<a name="177" href="#177">177</a>         assertTrue(!logger.isLoggable(Level.FINEST));
+<a name="178" href="#178">178</a> 
+<a name="179" href="#179">179</a>     }
+<a name="180" href="#180">180</a> 
+<a name="181" href="#181">181</a> 
+<a name="182" href="#182">182</a>     <em class="comment">// Test Serializability of Log instance</em>
+<a name="183" href="#183">183</a>     <strong>public</strong> <strong>void</strong> testSerializable() throws Exception {
+<a name="184" href="#184">184</a> 
+<a name="185" href="#185">185</a>         <strong>super</strong>.testSerializable();
+<a name="186" href="#186">186</a>         testExceptionMessages();
+<a name="187" href="#187">187</a> 
+<a name="188" href="#188">188</a>     }
+<a name="189" href="#189">189</a> 
+<a name="190" href="#190">190</a> 
+<a name="191" href="#191">191</a>     <em class="comment">// -------------------------------------------------------- Support Methods</em>
+<a name="192" href="#192">192</a> 
+<a name="193" href="#193">193</a> 
+<a name="194" href="#194">194</a>     <em class="comment">// Check the log instance</em>
+<a name="195" href="#195">195</a>     <strong>protected</strong> <strong>void</strong> checkLog() {
+<a name="196" href="#196">196</a> 
+<a name="197" href="#197">197</a>         assertNotNull(<span class="string">"Log exists"</span>, log);
+<a name="198" href="#198">198</a>         assertEquals(<span class="string">"Log class"</span>,
+<a name="199" href="#199">199</a>                      <span class="string">"org.apache.commons.logging.impl.Jdk14Logger"</span>,
+<a name="200" href="#200">200</a>                      log.getClass().getName());
+<a name="201" href="#201">201</a> 
+<a name="202" href="#202">202</a>         <em class="comment">// Assert which logging levels have been enabled</em>
+<a name="203" href="#203">203</a>         assertTrue(log.isFatalEnabled());
+<a name="204" href="#204">204</a>         assertTrue(log.isErrorEnabled());
+<a name="205" href="#205">205</a>         assertTrue(log.isWarnEnabled());
+<a name="206" href="#206">206</a>         assertTrue(log.isInfoEnabled());
+<a name="207" href="#207">207</a>         assertTrue(log.isDebugEnabled());
+<a name="208" href="#208">208</a>         assertTrue(!log.isTraceEnabled());
+<a name="209" href="#209">209</a> 
+<a name="210" href="#210">210</a>     }
+<a name="211" href="#211">211</a> 
+<a name="212" href="#212">212</a> 
+<a name="213" href="#213">213</a>     <em class="comment">// Check the recorded messages</em>
+<a name="214" href="#214">214</a>     <strong>protected</strong> <strong>void</strong> checkLogRecords(<strong>boolean</strong> thrown) {
+<a name="215" href="#215">215</a>         Iterator records = handler.records();
+<a name="216" href="#216">216</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; testMessages.length; i++) {
+<a name="217" href="#217">217</a>             assertTrue(records.hasNext());
+<a name="218" href="#218">218</a>             LogRecord record = (LogRecord) records.next();
+<a name="219" href="#219">219</a>             assertEquals(<span class="string">"LogRecord level"</span>,
+<a name="220" href="#220">220</a>                          testLevels[i], record.getLevel());
+<a name="221" href="#221">221</a>             assertEquals(<span class="string">"LogRecord message"</span>,
+<a name="222" href="#222">222</a>                          testMessages[i], record.getMessage());
+<a name="223" href="#223">223</a>             assertEquals(<span class="string">"LogRecord class"</span>,
+<a name="224" href="#224">224</a>                          <strong>this</strong>.getClass().getName(),
+<a name="225" href="#225">225</a>                          record.getSourceClassName());
+<a name="226" href="#226">226</a>             <strong>if</strong> (thrown) {
+<a name="227" href="#227">227</a>                 assertEquals(<span class="string">"LogRecord method"</span>,
+<a name="228" href="#228">228</a>                              <span class="string">"logExceptionMessages"</span>,
+<a name="229" href="#229">229</a>                              record.getSourceMethodName());
+<a name="230" href="#230">230</a>             } <strong>else</strong> {
+<a name="231" href="#231">231</a>                 assertEquals(<span class="string">"LogRecord method"</span>,
+<a name="232" href="#232">232</a>                              <span class="string">"logPlainMessages"</span>,
+<a name="233" href="#233">233</a>                              record.getSourceMethodName());
+<a name="234" href="#234">234</a>             }
+<a name="235" href="#235">235</a>             <strong>if</strong> (thrown) {
+<a name="236" href="#236">236</a>                 assertNotNull(<span class="string">"LogRecord thrown"</span>, record.getThrown());
+<a name="237" href="#237">237</a>                 assertTrue(<span class="string">"LogRecord thrown type"</span>,
+<a name="238" href="#238">238</a>                            record.getThrown() instanceof IndexOutOfBoundsException);
+<a name="239" href="#239">239</a>             } <strong>else</strong> {
+<a name="240" href="#240">240</a>                 assertNull(<span class="string">"LogRecord thrown"</span>,
+<a name="241" href="#241">241</a>                            record.getThrown());
+<a name="242" href="#242">242</a>             }
+<a name="243" href="#243">243</a>         }
+<a name="244" href="#244">244</a>         assertTrue(!records.hasNext());
+<a name="245" href="#245">245</a>         handler.flush();
+<a name="246" href="#246">246</a>     }
+<a name="247" href="#247">247</a> 
+<a name="248" href="#248">248</a> 
+<a name="249" href="#249">249</a>     <em class="comment">// Log the messages with exceptions</em>
+<a name="250" href="#250">250</a>     <strong>protected</strong> <strong>void</strong> logExceptionMessages() {
+<a name="251" href="#251">251</a>         Throwable t = <strong>new</strong> IndexOutOfBoundsException();
+<a name="252" href="#252">252</a>         log.trace(<span class="string">"trace"</span>, t); <em class="comment">// Should not actually get logged</em>
+<a name="253" href="#253">253</a>         log.debug(<span class="string">"debug"</span>, t);
+<a name="254" href="#254">254</a>         log.info(<span class="string">"info"</span>, t);
+<a name="255" href="#255">255</a>         log.warn(<span class="string">"warn"</span>, t);
+<a name="256" href="#256">256</a>         log.error(<span class="string">"error"</span>, t);
+<a name="257" href="#257">257</a>         log.fatal(<span class="string">"fatal"</span>, t);
+<a name="258" href="#258">258</a>     }
+<a name="259" href="#259">259</a> 
+<a name="260" href="#260">260</a> 
+<a name="261" href="#261">261</a>     <em class="comment">// Log the plain messages</em>
+<a name="262" href="#262">262</a>     <strong>protected</strong> <strong>void</strong> logPlainMessages() {
+<a name="263" href="#263">263</a>         log.trace(<span class="string">"trace"</span>); <em class="comment">// Should not actually get logged</em>
+<a name="264" href="#264">264</a>         log.debug(<span class="string">"debug"</span>);
+<a name="265" href="#265">265</a>         log.info(<span class="string">"info"</span>);
+<a name="266" href="#266">266</a>         log.warn(<span class="string">"warn"</span>);
+<a name="267" href="#267">267</a>         log.error(<span class="string">"error"</span>);
+<a name="268" href="#268">268</a>         log.fatal(<span class="string">"fatal"</span>);
+<a name="269" href="#269">269</a>     }
+<a name="270" href="#270">270</a> 
+<a name="271" href="#271">271</a> 
+<a name="272" href="#272">272</a>     <em class="comment">// Set up handlers instance</em>
+<a name="273" href="#273">273</a>     <strong>protected</strong> <strong>void</strong> setUpHandlers() throws Exception {
+<a name="274" href="#274">274</a>         Logger parent = logger;
+<a name="275" href="#275">275</a>         <strong>while</strong> (parent.getParent() != <strong>null</strong>) {
+<a name="276" href="#276">276</a>             parent = parent.getParent();
+<a name="277" href="#277">277</a>         }
+<a name="278" href="#278">278</a>         handlers = parent.getHandlers();
+<a name="279" href="#279">279</a>         <strong>if</strong> ((handlers != <strong>null</strong>) &amp;&amp; (handlers.length == 1) &amp;&amp;
+<a name="280" href="#280">280</a>             (handlers[0] instanceof <a href="../../../../../org/apache/commons/logging/jdk14/TestHandler.html">TestHandler</a>)) {
+<a name="281" href="#281">281</a>             handler = (TestHandler) handlers[0];
+<a name="282" href="#282">282</a>         }
+<a name="283" href="#283">283</a>     }
+<a name="284" href="#284">284</a> 
+<a name="285" href="#285">285</a> 
+<a name="286" href="#286">286</a>     <em class="comment">// Set up logger instance</em>
+<a name="287" href="#287">287</a>     <strong>protected</strong> <strong>void</strong> setUpLogger(String name) throws Exception {
+<a name="288" href="#288">288</a>         logger = Logger.getLogger(name);
+<a name="289" href="#289">289</a>     }
+<a name="290" href="#290">290</a> 
+<a name="291" href="#291">291</a> 
+<a name="292" href="#292">292</a>     <em class="comment">// Set up LogManager instance</em>
+<a name="293" href="#293">293</a>     <strong>protected</strong> <strong>void</strong> setUpManager(String config) throws Exception {
+<a name="294" href="#294">294</a>         manager = LogManager.getLogManager();
+<a name="295" href="#295">295</a>         InputStream is =
+<a name="296" href="#296">296</a>             <strong>this</strong>.getClass().getClassLoader().getResourceAsStream(config);
+<a name="297" href="#297">297</a>         manager.readConfiguration(is);
+<a name="298" href="#298">298</a>         is.close();
+<a name="299" href="#299">299</a>     }
+<a name="300" href="#300">300</a> 
+<a name="301" href="#301">301</a> 
+<a name="302" href="#302">302</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/CustomConfigTestCase.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,196 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>DefaultConfigTestCase xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * </em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * </em>
+<a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> * </em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> */</em> 
+<a name="16" href="#16">16</a>  
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../org/apache/commons/logging/jdk14/package-summary.html">org.apache.commons.logging.jdk14</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> java.io.ByteArrayInputStream;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.io.ByteArrayOutputStream;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.io.ObjectInputStream;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.io.ObjectOutputStream;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> junit.framework.Test;
+<a name="26" href="#26">26</a>  <strong>import</strong> junit.framework.TestCase;
+<a name="27" href="#27">27</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="28" href="#28">28</a>  
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.commons.logging.Log;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.commons.logging.LogFactory;
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>  <em>/**<em>*</em></em>
+<a name="34" href="#34">34</a>  <em> * &lt;p>TestCase for JDK 1.4 logging when running on a JDK 1.4 system with</em>
+<a name="35" href="#35">35</a>  <em> * zero configuration, and with Log4J not present (so JDK 1.4 logging</em>
+<a name="36" href="#36">36</a>  <em> * should be automatically configured.&lt;/p></em>
+<a name="37" href="#37">37</a>  <em> *</em>
+<a name="38" href="#38">38</a>  <em> * @author Craig R. McClanahan</em>
+<a name="39" href="#39">39</a>  <em> * @version $Revision$ $Date: 2004/02/28 21:46:45 $</em>
+<a name="40" href="#40">40</a>  <em> */</em>
+<a name="41" href="#41">41</a>  
+<a name="42" href="#42">42</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/commons/logging/jdk14/DefaultConfigTestCase.html">DefaultConfigTestCase</a> <strong>extends</strong> TestCase {
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>  
+<a name="45" href="#45">45</a>      <em class="comment">// ----------------------------------------------------------- Constructors</em>
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>  
+<a name="48" href="#48">48</a>      <em>/**<em>*</em></em>
+<a name="49" href="#49">49</a>  <em>     * &lt;p>Construct a new instance of this test case.&lt;/p></em>
+<a name="50" href="#50">50</a>  <em>     *</em>
+<a name="51" href="#51">51</a>  <em>     * @param name Name of the test case</em>
+<a name="52" href="#52">52</a>  <em>     */</em>
+<a name="53" href="#53">53</a>      <strong>public</strong> <a href="../../../../../org/apache/commons/logging/jdk14/DefaultConfigTestCase.html">DefaultConfigTestCase</a>(String name) {
+<a name="54" href="#54">54</a>          <strong>super</strong>(name);
+<a name="55" href="#55">55</a>      }
+<a name="56" href="#56">56</a>  
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>      <em class="comment">// ----------------------------------------------------- Instance Variables</em>
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>  
+<a name="61" href="#61">61</a>      <em>/**<em>*</em></em>
+<a name="62" href="#62">62</a>  <em>     * &lt;p>The {@link LogFactory} implementation we have selected.&lt;/p></em>
+<a name="63" href="#63">63</a>  <em>     */</em>
+<a name="64" href="#64">64</a>      <strong>protected</strong> LogFactory factory = <strong>null</strong>;
+<a name="65" href="#65">65</a>  
+<a name="66" href="#66">66</a>  
+<a name="67" href="#67">67</a>      <em>/**<em>*</em></em>
+<a name="68" href="#68">68</a>  <em>     * &lt;p>The {@link Log} implementation we have selected.&lt;/p></em>
+<a name="69" href="#69">69</a>  <em>     */</em>
+<a name="70" href="#70">70</a>      <strong>protected</strong> Log log = <strong>null</strong>;
+<a name="71" href="#71">71</a>  
+<a name="72" href="#72">72</a>  
+<a name="73" href="#73">73</a>      <em class="comment">// ------------------------------------------- JUnit Infrastructure Methods</em>
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>  
+<a name="76" href="#76">76</a>      <em>/**<em>*</em></em>
+<a name="77" href="#77">77</a>  <em>     * Set up instance variables required by this test case.</em>
+<a name="78" href="#78">78</a>  <em>     */</em>
+<a name="79" href="#79">79</a>      <strong>public</strong> <strong>void</strong> setUp() throws Exception {
+<a name="80" href="#80">80</a>          setUpFactory();
+<a name="81" href="#81">81</a>          setUpLog(<span class="string">"TestLogger"</span>);
+<a name="82" href="#82">82</a>      }
+<a name="83" href="#83">83</a>  
+<a name="84" href="#84">84</a>  
+<a name="85" href="#85">85</a>      <em>/**<em>*</em></em>
+<a name="86" href="#86">86</a>  <em>     * Return the tests included in this test suite.</em>
+<a name="87" href="#87">87</a>  <em>     */</em>
+<a name="88" href="#88">88</a>      <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="89" href="#89">89</a>          <strong>return</strong> (<strong>new</strong> TestSuite(DefaultConfigTestCase.<strong>class</strong>));
+<a name="90" href="#90">90</a>      }
+<a name="91" href="#91">91</a>  
+<a name="92" href="#92">92</a>      <em>/**<em>*</em></em>
+<a name="93" href="#93">93</a>  <em>     * Tear down instance variables required by this test case.</em>
+<a name="94" href="#94">94</a>  <em>     */</em>
+<a name="95" href="#95">95</a>      <strong>public</strong> <strong>void</strong> tearDown() {
+<a name="96" href="#96">96</a>          log = <strong>null</strong>;
+<a name="97" href="#97">97</a>          factory = <strong>null</strong>;
+<a name="98" href="#98">98</a>          LogFactory.releaseAll();
+<a name="99" href="#99">99</a>      }
+<a name="100" href="#100">100</a> 
+<a name="101" href="#101">101</a> 
+<a name="102" href="#102">102</a>     <em class="comment">// ----------------------------------------------------------- Test Methods</em>
+<a name="103" href="#103">103</a> 
+<a name="104" href="#104">104</a> 
+<a name="105" href="#105">105</a>     <em class="comment">// Test pristine Log instance</em>
+<a name="106" href="#106">106</a>     <strong>public</strong> <strong>void</strong> testPristineLog() {
+<a name="107" href="#107">107</a> 
+<a name="108" href="#108">108</a>         checkLog();
+<a name="109" href="#109">109</a> 
+<a name="110" href="#110">110</a>     }
+<a name="111" href="#111">111</a> 
+<a name="112" href="#112">112</a> 
+<a name="113" href="#113">113</a>     <em class="comment">// Test pristine LogFactory instance</em>
+<a name="114" href="#114">114</a>     <strong>public</strong> <strong>void</strong> testPristineFactory() {
+<a name="115" href="#115">115</a> 
+<a name="116" href="#116">116</a>         assertNotNull(<span class="string">"LogFactory exists"</span>, factory);
+<a name="117" href="#117">117</a>         assertEquals(<span class="string">"LogFactory class"</span>,
+<a name="118" href="#118">118</a>                      <span class="string">"org.apache.commons.logging.impl.LogFactoryImpl"</span>,
+<a name="119" href="#119">119</a>                      factory.getClass().getName());
+<a name="120" href="#120">120</a> 
+<a name="121" href="#121">121</a>         String names[] = factory.getAttributeNames();
+<a name="122" href="#122">122</a>         assertNotNull(<span class="string">"Names exists"</span>, names);
+<a name="123" href="#123">123</a>         assertEquals(<span class="string">"Names empty"</span>, 0, names.length);
+<a name="124" href="#124">124</a> 
+<a name="125" href="#125">125</a>     }
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a> 
+<a name="128" href="#128">128</a>     <em class="comment">// Test Serializability of Log instance</em>
+<a name="129" href="#129">129</a>     <strong>public</strong> <strong>void</strong> testSerializable() throws Exception {
+<a name="130" href="#130">130</a> 
+<a name="131" href="#131">131</a>         <em class="comment">// Serialize and deserialize the instance</em>
+<a name="132" href="#132">132</a>         ByteArrayOutputStream baos = <strong>new</strong> ByteArrayOutputStream();
+<a name="133" href="#133">133</a>         ObjectOutputStream oos = <strong>new</strong> ObjectOutputStream(baos);
+<a name="134" href="#134">134</a>         oos.writeObject(log);
+<a name="135" href="#135">135</a>         oos.close();
+<a name="136" href="#136">136</a>         ByteArrayInputStream bais =
+<a name="137" href="#137">137</a>             <strong>new</strong> ByteArrayInputStream(baos.toByteArray());
+<a name="138" href="#138">138</a>         ObjectInputStream ois = <strong>new</strong> ObjectInputStream(bais);
+<a name="139" href="#139">139</a>         log = (Log) ois.readObject();
+<a name="140" href="#140">140</a>         ois.close();
+<a name="141" href="#141">141</a> 
+<a name="142" href="#142">142</a>         <em class="comment">// Check the characteristics of the resulting object</em>
+<a name="143" href="#143">143</a>         checkLog();
+<a name="144" href="#144">144</a> 
+<a name="145" href="#145">145</a>     }
+<a name="146" href="#146">146</a> 
+<a name="147" href="#147">147</a> 
+<a name="148" href="#148">148</a>     <em class="comment">// -------------------------------------------------------- Support Methods</em>
+<a name="149" href="#149">149</a> 
+<a name="150" href="#150">150</a> 
+<a name="151" href="#151">151</a> 
+<a name="152" href="#152">152</a>     <em class="comment">// Check the log instance</em>
+<a name="153" href="#153">153</a>     <strong>protected</strong> <strong>void</strong> checkLog() {
+<a name="154" href="#154">154</a> 
+<a name="155" href="#155">155</a>         assertNotNull(<span class="string">"Log exists"</span>, log);
+<a name="156" href="#156">156</a>         assertEquals(<span class="string">"Log class"</span>,
+<a name="157" href="#157">157</a>                      <span class="string">"org.apache.commons.logging.impl.Jdk14Logger"</span>,
+<a name="158" href="#158">158</a>                      log.getClass().getName());
+<a name="159" href="#159">159</a> 
+<a name="160" href="#160">160</a>         <em class="comment">// Can we call level checkers with no exceptions?</em>
+<a name="161" href="#161">161</a>         log.isDebugEnabled();
+<a name="162" href="#162">162</a>         log.isErrorEnabled();
+<a name="163" href="#163">163</a>         log.isFatalEnabled();
+<a name="164" href="#164">164</a>         log.isInfoEnabled();
+<a name="165" href="#165">165</a>         log.isTraceEnabled();
+<a name="166" href="#166">166</a>         log.isWarnEnabled();
+<a name="167" href="#167">167</a> 
+<a name="168" href="#168">168</a>     }
+<a name="169" href="#169">169</a> 
+<a name="170" href="#170">170</a> 
+<a name="171" href="#171">171</a>     <em class="comment">// Set up factory instance</em>
+<a name="172" href="#172">172</a>     <strong>protected</strong> <strong>void</strong> setUpFactory() throws Exception {
+<a name="173" href="#173">173</a>         factory = LogFactory.getFactory();
+<a name="174" href="#174">174</a>     }
+<a name="175" href="#175">175</a> 
+<a name="176" href="#176">176</a> 
+<a name="177" href="#177">177</a>     <em class="comment">// Set up log instance</em>
+<a name="178" href="#178">178</a>     <strong>protected</strong> <strong>void</strong> setUpLog(String name) throws Exception {
+<a name="179" href="#179">179</a>         log = LogFactory.getLog(name);
+<a name="180" href="#180">180</a>     }
+<a name="181" href="#181">181</a> 
+<a name="182" href="#182">182</a> 
+<a name="183" href="#183">183</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestHandler xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * </em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * </em>
+<a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> * </em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> */</em> 
+<a name="16" href="#16">16</a>  <strong>package</strong> <a href="../../../../../org/apache/commons/logging/jdk14/package-summary.html">org.apache.commons.logging.jdk14</a>;
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> java.util.ArrayList;
+<a name="20" href="#20">20</a>  <strong>import</strong> java.util.Iterator;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.util.List;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.util.logging.Handler;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.util.logging.LogRecord;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  <em>/**<em>*</em></em>
+<a name="27" href="#27">27</a>  <em> * &lt;p>Test implementation of &lt;code>java.util.logging.Handler&lt;/code>.&lt;/p></em>
+<a name="28" href="#28">28</a>  <em> *</em>
+<a name="29" href="#29">29</a>  <em> * @author Craig R. McClanahan</em>
+<a name="30" href="#30">30</a>  <em> * @version $Revision$ $Date: 2004/02/28 21:46:45 $</em>
+<a name="31" href="#31">31</a>  <em> */</em>
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/commons/logging/jdk14/TestHandler.html">TestHandler</a> <strong>extends</strong> Handler {
+<a name="34" href="#34">34</a>  
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>  
+<a name="37" href="#37">37</a>      <em class="comment">// ----------------------------------------------------- Instance Variables</em>
+<a name="38" href="#38">38</a>  
+<a name="39" href="#39">39</a>  
+<a name="40" href="#40">40</a>      <em class="comment">// The set of logged records for this handler</em>
+<a name="41" href="#41">41</a>      <strong>private</strong> List records = <strong>new</strong> ArrayList();
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <em class="comment">// --------------------------------------------------------- Public Methods</em>
+<a name="45" href="#45">45</a>  
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <strong>public</strong> Iterator records() {
+<a name="48" href="#48">48</a>          <strong>return</strong> (records.iterator());
+<a name="49" href="#49">49</a>      }
+<a name="50" href="#50">50</a>  
+<a name="51" href="#51">51</a>  
+<a name="52" href="#52">52</a>      <em class="comment">// -------------------------------------------------------- Handler Methods</em>
+<a name="53" href="#53">53</a>  
+<a name="54" href="#54">54</a>  
+<a name="55" href="#55">55</a>      <strong>public</strong> <strong>void</strong> close() {
+<a name="56" href="#56">56</a>      }
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>      <strong>public</strong> <strong>void</strong> flush() {
+<a name="60" href="#60">60</a>          records.clear();
+<a name="61" href="#61">61</a>      }
+<a name="62" href="#62">62</a>  
+<a name="63" href="#63">63</a>  
+<a name="64" href="#64">64</a>      <strong>public</strong> <strong>void</strong> publish(LogRecord record) {
+<a name="65" href="#65">65</a>          records.add(record);
+<a name="66" href="#66">66</a>      }
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>  
+<a name="69" href="#69">69</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/TestHandler.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,35 @@
+
+
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml lang="en">
+    <head>
+      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+      <title>Logging 1.0.4 Reference Package org.apache.commons.logging.jdk14</title>
+      <link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
+    </head>
+    <body>
+
+      <h3>
+        <a href="package-summary.html" target="classFrame">org.apache.commons.logging.jdk14</a>
+      </h3>
+
+      <h3>Classes</h3>
+
+      <ul>
+        
+          <li>
+            <a href="CustomConfigTestCase.html" target="classFrame">CustomConfigTestCase</a>
+          </li>
+        
+          <li>
+            <a href="DefaultConfigTestCase.html" target="classFrame">DefaultConfigTestCase</a>
+          </li>
+        
+          <li>
+            <a href="TestHandler.html" target="classFrame">TestHandler</a>
+          </li>
+        
+      </ul>
+
+    </body>
+  </html>

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-frame.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,114 @@
+
+
+  
+
+  
+    
+
+    
+
+    
+
+  
+      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+      <html xmlns="http://www.w3.org/1999/xhtml lang="en">
+        <head>
+          <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
+          <title>Logging 1.0.4 Reference Package </title>
+          <link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
+        </head>
+        <body>
+
+          
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+      
+      <h2>Package org.apache.commons.logging.jdk14</h2>
+
+      <table class="summary">
+        <thead>
+          <tr>
+            <th>Class Summary</th>
+          </tr>
+        </thead>
+
+        <tbody>
+          
+            <tr>
+              <td>
+                <a href="CustomConfigTestCase.html" target="classFrame">CustomConfigTestCase</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="DefaultConfigTestCase.html" target="classFrame">DefaultConfigTestCase</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
+                <a href="TestHandler.html" target="classFrame">TestHandler</a>
+              </td>
+            </tr>
+          
+        </tbody>
+      </table>
+
+    
+      
+      
+
+      <div class="overview">
+        <ul>
+          <li>
+            <a href="../../../../../overview-summary.html">Overview</a>
+          </li>
+          <li class="selected">Package</li>
+        </ul>
+      </div>
+      <div class="framenoframe">
+        <ul>
+          <li>
+            <a href="../../../../../index.html" target="_top">FRAMES</a>
+          </li>
+          <li>
+            <a href="package-summary.html" target="_top">NO FRAMES</a>
+          </li>
+        </ul>
+      </div>
+
+      
+
+    
+    
+
+          <hr></hr>
+
+          Copyright &copy; 2001-2004 The Apache Software Foundation. All Rights Reserved.
+        </body>
+      </html>
+    

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/jdk14/package-summary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/log4j/CustomConfigTestCase.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/log4j/CustomConfigTestCase.html (added)
+++ websites/production/commons/content/proper/commons-logging/javadocs/api-1.0.4/xref-test/org/apache/commons/logging/log4j/CustomConfigTestCase.html Tue Mar  5 18:53:06 2013
@@ -0,0 +1,296 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>CustomConfigTestCase xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * </em>
+<a name="4" href="#4">4</a>   <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * </em>
+<a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="9" href="#9">9</a>   <em class="comment"> * </em>
+<a name="10" href="#10">10</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * limitations under the License.</em>
+<a name="15" href="#15">15</a>  <em class="comment"> */</em> 
+<a name="16" href="#16">16</a>  
+<a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../org/apache/commons/logging/log4j/package-summary.html">org.apache.commons.logging.log4j</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> java.io.InputStream;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.util.Enumeration;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.util.Iterator;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.util.Properties;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> junit.framework.Test;
+<a name="26" href="#26">26</a>  <strong>import</strong> junit.framework.TestSuite;
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.log4j.Level;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.log4j.Logger;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.log4j.PropertyConfigurator;
+<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.log4j.spi.LoggingEvent;
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>  
+<a name="34" href="#34">34</a>  <em>/**<em>*</em></em>
+<a name="35" href="#35">35</a>  <em> * &lt;p>TestCase for Log4J logging when running on a system with Log4J present,</em>
+<a name="36" href="#36">36</a>  <em> * so that Log4J should be selected and an appropriate</em>
+<a name="37" href="#37">37</a>  <em> * logger configured per the configuration properties.&lt;/p></em>
+<a name="38" href="#38">38</a>  <em> *</em>
+<a name="39" href="#39">39</a>  <em> * @author Craig R. McClanahan</em>
+<a name="40" href="#40">40</a>  <em> * @version $Revision$ $Date: 2004/05/19 20:59:56 $</em>
+<a name="41" href="#41">41</a>  <em> */</em>
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/commons/logging/log4j/CustomConfigTestCase.html">CustomConfigTestCase</a> <strong>extends</strong> <a href="../../../../../org/apache/commons/logging/log4j/DefaultConfigTestCase.html">DefaultConfigTestCase</a> {
+<a name="44" href="#44">44</a>  
+<a name="45" href="#45">45</a>  
+<a name="46" href="#46">46</a>      <em class="comment">// ----------------------------------------------------------- Constructors</em>
+<a name="47" href="#47">47</a>  
+<a name="48" href="#48">48</a>  
+<a name="49" href="#49">49</a>      <em>/**<em>*</em></em>
+<a name="50" href="#50">50</a>  <em>     * &lt;p>Construct a new instance of this test case.&lt;/p></em>
+<a name="51" href="#51">51</a>  <em>     *</em>
+<a name="52" href="#52">52</a>  <em>     * @param name Name of the test case</em>
+<a name="53" href="#53">53</a>  <em>     */</em>
+<a name="54" href="#54">54</a>      <strong>public</strong> <a href="../../../../../org/apache/commons/logging/log4j/CustomConfigTestCase.html">CustomConfigTestCase</a>(String name) {
+<a name="55" href="#55">55</a>          <strong>super</strong>(name);
+<a name="56" href="#56">56</a>      }
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>      <em class="comment">// ----------------------------------------------------- Instance Variables</em>
+<a name="60" href="#60">60</a>  
+<a name="61" href="#61">61</a>  
+<a name="62" href="#62">62</a>      <em>/**<em>*</em></em>
+<a name="63" href="#63">63</a>  <em>     * &lt;p>The &lt;code>Appender&lt;/code> we are utilizing.&lt;/p></em>
+<a name="64" href="#64">64</a>  <em>     */</em>
+<a name="65" href="#65">65</a>      <strong>protected</strong> <a href="../../../../../org/apache/commons/logging/log4j/TestAppender.html">TestAppender</a> appender = <strong>null</strong>;
+<a name="66" href="#66">66</a>  
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>      <em>/**<em>*</em></em>
+<a name="69" href="#69">69</a>  <em>     * &lt;p>The &lt;code>Logger&lt;/code> we are utilizing.&lt;/p></em>
+<a name="70" href="#70">70</a>  <em>     */</em>
+<a name="71" href="#71">71</a>      <strong>protected</strong> Logger logger = <strong>null</strong>;
+<a name="72" href="#72">72</a>  
+<a name="73" href="#73">73</a>  
+<a name="74" href="#74">74</a>      <em>/**<em>*</em></em>
+<a name="75" href="#75">75</a>  <em>     * &lt;p>The message levels that should have been logged.&lt;/p></em>
+<a name="76" href="#76">76</a>  <em>     */</em>
+<a name="77" href="#77">77</a>      <strong>protected</strong> Level testLevels[] =
+<a name="78" href="#78">78</a>      { Level.INFO, Level.WARN, Level.ERROR, Level.FATAL };
+<a name="79" href="#79">79</a>  
+<a name="80" href="#80">80</a>  
+<a name="81" href="#81">81</a>      <em>/**<em>*</em></em>
+<a name="82" href="#82">82</a>  <em>     * &lt;p>The message strings that should have been logged.&lt;/p></em>
+<a name="83" href="#83">83</a>  <em>     */</em>
+<a name="84" href="#84">84</a>      <strong>protected</strong> String testMessages[] =
+<a name="85" href="#85">85</a>      { <span class="string">"info"</span>, <span class="string">"warn"</span>, <span class="string">"error"</span>, <span class="string">"fatal"</span> };
+<a name="86" href="#86">86</a>  
+<a name="87" href="#87">87</a>  
+<a name="88" href="#88">88</a>      <em class="comment">// ------------------------------------------- JUnit Infrastructure Methods</em>
+<a name="89" href="#89">89</a>  
+<a name="90" href="#90">90</a>  
+<a name="91" href="#91">91</a>      <em>/**<em>*</em></em>
+<a name="92" href="#92">92</a>  <em>     * Set up instance variables required by this test case.</em>
+<a name="93" href="#93">93</a>  <em>     */</em>
+<a name="94" href="#94">94</a>      <strong>public</strong> <strong>void</strong> setUp() throws Exception {
+<a name="95" href="#95">95</a>          setUpAppender
+<a name="96" href="#96">96</a>              (<span class="string">"org/apache/commons/logging/log4j/CustomConfig.properties"</span>);
+<a name="97" href="#97">97</a>          setUpLogger(<span class="string">"TestLogger"</span>);
+<a name="98" href="#98">98</a>          setUpFactory();
+<a name="99" href="#99">99</a>          setUpLog(<span class="string">"TestLogger"</span>);
+<a name="100" href="#100">100</a>     }
+<a name="101" href="#101">101</a> 
+<a name="102" href="#102">102</a> 
+<a name="103" href="#103">103</a>     <em>/**<em>*</em></em>
+<a name="104" href="#104">104</a> <em>     * Return the tests included in this test suite.</em>
+<a name="105" href="#105">105</a> <em>     */</em>
+<a name="106" href="#106">106</a>     <strong>public</strong> <strong>static</strong> Test suite() {
+<a name="107" href="#107">107</a>         <strong>return</strong> (<strong>new</strong> TestSuite(CustomConfigTestCase.<strong>class</strong>));
+<a name="108" href="#108">108</a>     }
+<a name="109" href="#109">109</a> 
+<a name="110" href="#110">110</a>     <em>/**<em>*</em></em>
+<a name="111" href="#111">111</a> <em>     * Tear down instance variables required by this test case.</em>
+<a name="112" href="#112">112</a> <em>     */</em>
+<a name="113" href="#113">113</a>     <strong>public</strong> <strong>void</strong> tearDown() {
+<a name="114" href="#114">114</a>         <strong>super</strong>.tearDown();
+<a name="115" href="#115">115</a>         Logger.getRootLogger().removeAppender(appender);
+<a name="116" href="#116">116</a>         appender = <strong>null</strong>;
+<a name="117" href="#117">117</a>         logger = <strong>null</strong>;
+<a name="118" href="#118">118</a>     }
+<a name="119" href="#119">119</a> 
+<a name="120" href="#120">120</a> 
+<a name="121" href="#121">121</a>     <em class="comment">// ----------------------------------------------------------- Test Methods</em>
+<a name="122" href="#122">122</a> 
+<a name="123" href="#123">123</a> 
+<a name="124" href="#124">124</a>     <em class="comment">// Test logging message strings with exceptions</em>
+<a name="125" href="#125">125</a>     <strong>public</strong> <strong>void</strong> testExceptionMessages() throws Exception {
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a>         logExceptionMessages();
+<a name="128" href="#128">128</a>         checkLoggingEvents(<strong>true</strong>);
+<a name="129" href="#129">129</a> 
+<a name="130" href="#130">130</a>     }
+<a name="131" href="#131">131</a> 
+<a name="132" href="#132">132</a> 
+<a name="133" href="#133">133</a>     <em class="comment">// Test logging plain message strings</em>
+<a name="134" href="#134">134</a>     <strong>public</strong> <strong>void</strong> testPlainMessages() throws Exception {
+<a name="135" href="#135">135</a> 
+<a name="136" href="#136">136</a>         logPlainMessages();
+<a name="137" href="#137">137</a>         checkLoggingEvents(false);
+<a name="138" href="#138">138</a> 
+<a name="139" href="#139">139</a>     }
+<a name="140" href="#140">140</a> 
+<a name="141" href="#141">141</a> 
+<a name="142" href="#142">142</a>     <em class="comment">// Test pristine Appender instance</em>
+<a name="143" href="#143">143</a>     <strong>public</strong> <strong>void</strong> testPristineAppender() {
+<a name="144" href="#144">144</a> 
+<a name="145" href="#145">145</a>         assertNotNull(<span class="string">"Appender exists"</span>, appender);
+<a name="146" href="#146">146</a> 
+<a name="147" href="#147">147</a>     }
+<a name="148" href="#148">148</a> 
+<a name="149" href="#149">149</a> 
+<a name="150" href="#150">150</a>     <em class="comment">// Test pristine Log instance</em>
+<a name="151" href="#151">151</a>     <strong>public</strong> <strong>void</strong> testPristineLog() {
+<a name="152" href="#152">152</a> 
+<a name="153" href="#153">153</a>         <strong>super</strong>.testPristineLog();
+<a name="154" href="#154">154</a> 
+<a name="155" href="#155">155</a>     }
+<a name="156" href="#156">156</a> 
+<a name="157" href="#157">157</a> 
+<a name="158" href="#158">158</a>     <em class="comment">// Test pristine Logger instance</em>
+<a name="159" href="#159">159</a>     <strong>public</strong> <strong>void</strong> testPristineLogger() {
+<a name="160" href="#160">160</a> 
+<a name="161" href="#161">161</a>         assertNotNull(<span class="string">"Logger exists"</span>, logger);
+<a name="162" href="#162">162</a>         assertEquals(<span class="string">"Logger level"</span>, Level.INFO, logger.getEffectiveLevel());
+<a name="163" href="#163">163</a>         assertEquals(<span class="string">"Logger name"</span>, <span class="string">"TestLogger"</span>, logger.getName());
+<a name="164" href="#164">164</a> 
+<a name="165" href="#165">165</a>     }
+<a name="166" href="#166">166</a> 
+<a name="167" href="#167">167</a> 
+<a name="168" href="#168">168</a>     <em class="comment">// Test Serializability of Log instance</em>
+<a name="169" href="#169">169</a>     <strong>public</strong> <strong>void</strong> testSerializable() throws Exception {
+<a name="170" href="#170">170</a> 
+<a name="171" href="#171">171</a>         <strong>super</strong>.testSerializable();
+<a name="172" href="#172">172</a>         testExceptionMessages();
+<a name="173" href="#173">173</a> 
+<a name="174" href="#174">174</a>     }
+<a name="175" href="#175">175</a> 
+<a name="176" href="#176">176</a> 
+<a name="177" href="#177">177</a>     <em class="comment">// -------------------------------------------------------- Support Methods</em>
+<a name="178" href="#178">178</a> 
+<a name="179" href="#179">179</a> 
+<a name="180" href="#180">180</a>     <em class="comment">// Check the log instance</em>
+<a name="181" href="#181">181</a>     <strong>protected</strong> <strong>void</strong> checkLog() {
+<a name="182" href="#182">182</a> 
+<a name="183" href="#183">183</a>         assertNotNull(<span class="string">"Log exists"</span>, log);
+<a name="184" href="#184">184</a>         assertEquals(<span class="string">"Log class"</span>,
+<a name="185" href="#185">185</a>                      <span class="string">"org.apache.commons.logging.impl.Log4JLogger"</span>,
+<a name="186" href="#186">186</a>                      log.getClass().getName());
+<a name="187" href="#187">187</a> 
+<a name="188" href="#188">188</a>         <em class="comment">// Assert which logging levels have been enabled</em>
+<a name="189" href="#189">189</a>         assertTrue(log.isErrorEnabled());
+<a name="190" href="#190">190</a>         assertTrue(log.isWarnEnabled());
+<a name="191" href="#191">191</a>         assertTrue(log.isInfoEnabled());
+<a name="192" href="#192">192</a>         assertTrue(!log.isDebugEnabled());
+<a name="193" href="#193">193</a>         assertTrue(!log.isTraceEnabled());
+<a name="194" href="#194">194</a> 
+<a name="195" href="#195">195</a>     }
+<a name="196" href="#196">196</a> 
+<a name="197" href="#197">197</a> 
+<a name="198" href="#198">198</a>     <em class="comment">// Check the recorded messages</em>
+<a name="199" href="#199">199</a>     <strong>protected</strong> <strong>void</strong> checkLoggingEvents(<strong>boolean</strong> thrown) {
+<a name="200" href="#200">200</a>         Iterator events = appender.events();
+<a name="201" href="#201">201</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; testMessages.length; i++) {
+<a name="202" href="#202">202</a>             assertTrue(<span class="string">"Logged event "</span> + i + <span class="string">" exists"</span>,events.hasNext());
+<a name="203" href="#203">203</a>             LoggingEvent event = (LoggingEvent) events.next();
+<a name="204" href="#204">204</a>             assertEquals(<span class="string">"LoggingEvent level"</span>,
+<a name="205" href="#205">205</a>                          testLevels[i], event.getLevel());
+<a name="206" href="#206">206</a>             assertEquals(<span class="string">"LoggingEvent message"</span>,
+<a name="207" href="#207">207</a>                          testMessages[i], event.getMessage());
+<a name="208" href="#208">208</a>             <em class="comment">/*<em class="comment"> Does not appear to be logged correctly?</em></em>
+<a name="209" href="#209">209</a> <em class="comment">            assertEquals("LoggingEvent class",</em>
+<a name="210" href="#210">210</a> <em class="comment">                         this.getClass().getName(),</em>
+<a name="211" href="#211">211</a> <em class="comment">                         event.getLocationInformation().getClassName());</em>
+<a name="212" href="#212">212</a> <em class="comment">            */</em>
+<a name="213" href="#213">213</a>             <em class="comment">/*<em class="comment"> Does not appear to be logged correctly?</em></em>
+<a name="214" href="#214">214</a> <em class="comment">            if (thrown) {</em>
+<a name="215" href="#215">215</a> <em class="comment">                assertEquals("LoggingEvent method",</em>
+<a name="216" href="#216">216</a> <em class="comment">                             "logExceptionMessages",</em>
+<a name="217" href="#217">217</a> <em class="comment">                             event.getLocationInformation().getMethodName());</em>
+<a name="218" href="#218">218</a> <em class="comment">            } else {</em>
+<a name="219" href="#219">219</a> <em class="comment">                assertEquals("LoggingEvent method",</em>
+<a name="220" href="#220">220</a> <em class="comment">                             "logPlainMessages",</em>
+<a name="221" href="#221">221</a> <em class="comment">                             event.getLocationInformation().getMethodName());</em>
+<a name="222" href="#222">222</a> <em class="comment">            }</em>
+<a name="223" href="#223">223</a> <em class="comment">            */</em>
+<a name="224" href="#224">224</a>             <strong>if</strong> (thrown) {
+<a name="225" href="#225">225</a>                 assertNotNull(<span class="string">"LoggingEvent thrown"</span>,
+<a name="226" href="#226">226</a>                               event.getThrowableInformation().getThrowableStrRep());
+<a name="227" href="#227">227</a>                 assertTrue(<span class="string">"LoggingEvent thrown type"</span>,
+<a name="228" href="#228">228</a>                            event.getThrowableInformation()
+<a name="229" href="#229">229</a>                                 .getThrowableStrRep()[0]
+<a name="230" href="#230">230</a>                                     .indexOf(<span class="string">"IndexOutOfBoundsException"</span>)>0);
+<a name="231" href="#231">231</a>             } <strong>else</strong> {
+<a name="232" href="#232">232</a>                 assertNull(<span class="string">"LoggingEvent thrown"</span>,
+<a name="233" href="#233">233</a>                            event.getThrowableInformation());
+<a name="234" href="#234">234</a>             }
+<a name="235" href="#235">235</a>         }
+<a name="236" href="#236">236</a>         assertTrue(!events.hasNext());
+<a name="237" href="#237">237</a>         appender.flush();
+<a name="238" href="#238">238</a>     }
+<a name="239" href="#239">239</a> 
+<a name="240" href="#240">240</a> 
+<a name="241" href="#241">241</a>     <em class="comment">// Log the messages with exceptions</em>
+<a name="242" href="#242">242</a>     <strong>protected</strong> <strong>void</strong> logExceptionMessages() {
+<a name="243" href="#243">243</a>         Throwable t = <strong>new</strong> IndexOutOfBoundsException();
+<a name="244" href="#244">244</a>         log.trace(<span class="string">"trace"</span>, t); <em class="comment">// Should not actually get logged</em>
+<a name="245" href="#245">245</a>         log.debug(<span class="string">"debug"</span>, t); <em class="comment">// Should not actually get logged</em>
+<a name="246" href="#246">246</a>         log.info(<span class="string">"info"</span>, t);
+<a name="247" href="#247">247</a>         log.warn(<span class="string">"warn"</span>, t);
+<a name="248" href="#248">248</a>         log.error(<span class="string">"error"</span>, t);
+<a name="249" href="#249">249</a>         log.fatal(<span class="string">"fatal"</span>, t);
+<a name="250" href="#250">250</a>     }
+<a name="251" href="#251">251</a> 
+<a name="252" href="#252">252</a> 
+<a name="253" href="#253">253</a>     <em class="comment">// Log the plain messages</em>
+<a name="254" href="#254">254</a>     <strong>protected</strong> <strong>void</strong> logPlainMessages() {
+<a name="255" href="#255">255</a>         log.trace(<span class="string">"trace"</span>); <em class="comment">// Should not actually get logged</em>
+<a name="256" href="#256">256</a>         log.debug(<span class="string">"debug"</span>); <em class="comment">// Should not actually get logged</em>
+<a name="257" href="#257">257</a>         log.info(<span class="string">"info"</span>);
+<a name="258" href="#258">258</a>         log.warn(<span class="string">"warn"</span>);
+<a name="259" href="#259">259</a>         log.error(<span class="string">"error"</span>);
+<a name="260" href="#260">260</a>         log.fatal(<span class="string">"fatal"</span>);
+<a name="261" href="#261">261</a>     }
+<a name="262" href="#262">262</a> 
+<a name="263" href="#263">263</a> 
+<a name="264" href="#264">264</a>     <em class="comment">// Set up our custom Appender</em>
+<a name="265" href="#265">265</a>     <strong>protected</strong> <strong>void</strong> setUpAppender(String config) throws Exception {
+<a name="266" href="#266">266</a>         Properties props = <strong>new</strong> Properties();
+<a name="267" href="#267">267</a>         InputStream is =
+<a name="268" href="#268">268</a>             <strong>this</strong>.getClass().getClassLoader().getResourceAsStream(config);
+<a name="269" href="#269">269</a>         props.load(is);
+<a name="270" href="#270">270</a>         is.close();
+<a name="271" href="#271">271</a>         PropertyConfigurator.configure(props);
+<a name="272" href="#272">272</a>         Enumeration appenders = Logger.getRootLogger().getAllAppenders();
+<a name="273" href="#273">273</a>         appender = (TestAppender) appenders.nextElement();
+<a name="274" href="#274">274</a>     }
+<a name="275" href="#275">275</a> 
+<a name="276" href="#276">276</a> 
+<a name="277" href="#277">277</a>     <em class="comment">// Set up our custom Logger</em>
+<a name="278" href="#278">278</a>     <strong>protected</strong> <strong>void</strong> setUpLogger(String name) throws Exception {
+<a name="279" href="#279">279</a>         logger = Logger.getLogger(name);
+<a name="280" href="#280">280</a>     }
+<a name="281" href="#281">281</a> 
+<a name="282" href="#282">282</a> 
+<a name="283" href="#283">283</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+