ceki        2003/03/03 07:24:03

  Modified:    .        build.properties.sample
               docs     HISTORY TODO manual.html
               docs/images coverSmall.png
               src/java/org/apache/log4j LogManager.java
               src/java/org/apache/log4j/helpers Transform.java
               src/java/org/apache/log4j/xml DOMConfigurator.java
               tests    build.xml
               tests/src/java/org/apache/log4j/xml XMLLayoutTestCase.java
  Added:       tests/witness xmlLayout.null
  Log:
  Syncing 1.3 branch (main) with 1.2
  
  Revision  Changes    Path
  1.7       +7 -4      jakarta-log4j/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/build.properties.sample,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.properties.sample   19 Feb 2003 05:51:47 -0000      1.6
  +++ build.properties.sample   3 Mar 2003 15:24:02 -0000       1.7
  @@ -1,7 +1,10 @@
  -# JAXP OPTIONAL; required to build the DOMConfigurator
  -jaxp.home=/java/jaxp-1.1
  -jaxp.jaxp.jar=${jaxp.home}/jaxp.jar
  -jaxp.parser.jar=${jaxp.home}/crimson.jar
  +# The jaxp interface and a jaxp parser are required to build the
  +# DOMConfigurator. However, these are already available since Ant
  +# needs them too.
  +
  +# jaxp.home=/java/jaxp-1.1 
  +# jaxp.jaxp.jar=${jaxp.home}/jaxp.jar
  +# jaxp.parser.jar=${jaxp.home}/crimson.jar
   
   # JavaMail API OPTIONAL; required to build the SMTPAppender
   javamail.jar=/java/javamail-1.2/mail.jar
  
  
  
  1.99      +14 -0     jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- HISTORY   9 Oct 2002 22:50:01 -0000       1.98
  +++ HISTORY   3 Mar 2003 15:24:02 -0000       1.99
  @@ -5,6 +5,20 @@
          client code. 
    [***] Changes requiring important modifications to existing client code.
   
  + February 18th, 2003
  + 
  + - Release of version 1.2.8
  +
  + - Fixed bug #11570 whereby XMLAppender would throw a
  +   NullPointerException if the input message was null. Many thanks to
  +   David Vandegrift for reporting the bug and to Hendrik Brummermann for
  +   supplying the patch. [*]
  +
  + - Fixed bug #12366 whereby various versions of Xerces would not parse
  +   log4j configuration scripts expressed in XML format. [*]
  +
  + - Fixed bug #15599. SocketAppender now honors ReconnectionDelay of 0.
  +   Many thanks to Scott Schram for reporting the bug and providing the fix. [*]
   
    October 9th, 2002
   
  
  
  
  1.3       +4 -7      jakarta-log4j/docs/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/TODO,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TODO      18 Nov 2001 22:10:35 -0000      1.2
  +++ TODO      3 Mar 2003 15:24:02 -0000       1.3
  @@ -5,16 +5,9 @@
   
   - Add a properties file option to log4j:configure in XML.
   
  -- Really quiet mode for LogLog.
  -
  -- Deprecate configure element in DTD.
   
  -- Support for duplicate appender suppression in configurators.
  -- Clean up the association of renderers and hierarchies
  -- FailOverAppender
   
   - Graceful congiguration merging
  -
   - Integrate tons of GUI code.
   - JDBCAppender.
   - Time based rolling.
  @@ -30,6 +23,10 @@
        
   DONE
   
  +- Really quiet mode for LogLog.
  +- Deprecate configure element in DTD.
  +- Clean up the association of renderers and hierarchies
  +- FailOverAppender
   - Add priority#priorityClass to Configurators
   - log4j: namespace in DTD
   - Mapped Diagnostic Contexts
  
  
  
  1.38      +6 -8      jakarta-log4j/docs/manual.html
  
  Index: manual.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/manual.html,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- manual.html       3 Jan 2003 09:10:36 -0000       1.37
  +++ manual.html       3 Mar 2003 15:24:02 -0000       1.38
  @@ -22,14 +22,12 @@
         distribution. This document is based on the article <a
         href="http://www.javaworld.com/jw-11-2000/jw-1122-log4j.html";>"Log4j
         delivers control over logging"</a> published in November 2000
  -      edition of <a
  -      href="http://www.javaworld.com";>JavaWorld</a>. However, the
  -      present article contains more detailed and up to date
  -      information. The present short manual also borrows some text
  -      from <a
  -      
href="http://www.flashline.com/components/view.jsp?prodid=4702&affiliateid=657173";>
  -      "<em>The complete log4j manual</em>"</a> by the same author
  -      (yours truly).
  +      edition of JavaWorld. However, the present article contains more
  +      detailed and up to date information. The present short manual
  +      also borrows some text from <a
  +      href="https://www.qos.ch/shop/products/clm_t.jsp";>"<em>The
  +      complete log4j manual</em>"</a> by the same author (yours
  +      truly).
   
   <h2>Abstract</h2>
   
  
  
  
  1.2       +229 -754  jakarta-log4j/docs/images/coverSmall.png
  
        <<Binary file>>
  
  
  1.11      +1 -1      jakarta-log4j/src/java/org/apache/log4j/LogManager.java
  
  Index: LogManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/LogManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LogManager.java   22 Nov 2002 10:27:23 -0000      1.10
  +++ LogManager.java   3 Mar 2003 15:24:03 -0000       1.11
  @@ -118,7 +118,7 @@
        OptionConverter.selectAndConfigure(url, configuratorClassName, 
                                           LogManager.getLoggerRepository());
         } else {
  -     LogLog.debug("Could not find resource: ["+configurationOptionStr+"].");
  +     LogLog.debug("Could not find resources to perform automatic configuration.");
         }
       }  
     } 
  
  
  
  1.3       +5 -1      jakarta-log4j/src/java/org/apache/log4j/helpers/Transform.java
  
  Index: Transform.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/helpers/Transform.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Transform.java    9 Oct 2002 22:50:03 -0000       1.2
  +++ Transform.java    3 Mar 2003 15:24:03 -0000       1.3
  @@ -71,8 +71,12 @@
     * @param str The String that is inserted into an existing CDATA Section within 
buf.  
     * */
     static public void appendEscapingCDATA(StringBuffer buf, String str) {
  +    if(str == null) {
  +      buf.append("");
  +      return;
  +    }
  +
       int end = str.indexOf(CDATA_END);
  -    
       if (end < 0) {
         buf.append(str);
         return;
  
  
  
  1.54      +10 -18    jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java
  
  Index: DOMConfigurator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- DOMConfigurator.java      11 Dec 2002 07:26:47 -0000      1.53
  +++ DOMConfigurator.java      3 Mar 2003 15:24:03 -0000       1.54
  @@ -669,11 +669,11 @@
       DocumentBuilderFactory dbf = null;
       this.repository = repository;
       try { 
  -      LogLog.debug("System property is :"+
  +      LogLog.debug("System property ["+dbfKey+"] is: "+
                                OptionConverter.getSystemProperty(dbfKey, 
                                                                  null)); 
         dbf = DocumentBuilderFactory.newInstance();
  -      LogLog.debug("Standard DocumentBuilderFactory search succeded.");
  +      LogLog.debug("Search for the standard DocumentBuilderFactory succeded.");
         LogLog.debug("DocumentBuilderFactory is: "+dbf.getClass().getName());
       } catch(FactoryConfigurationError fce) {
         Exception e = fce.getException();
  @@ -682,25 +682,17 @@
       }
         
       try {
  -      // This makes ID/IDREF attributes to have a meaning. Don't ask
  -      // me why.
         dbf.setValidating(true);
  -      //dbf.setNamespaceAware(true);
   
         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
  -      docBuilder.setErrorHandler(new SAXErrorHandler());
  -
  -      Class clazz = this.getClass();
  -      URL dtdURL = clazz.getResource("/org/apache/log4j/xml/log4j.dtd");
  -      if(dtdURL == null) {
  -     LogLog.error("Could not find [log4j.dtd]. Used ["+clazz.getClassLoader()+
  -                  "] class loader in the search.");
  -      }
  -      else {
  -     LogLog.debug("URL to log4j.dtd is [" + dtdURL.toString()+"].");
  -     inputSource.setSystemId(dtdURL.toString());
  -      }
  -      Document doc = docBuilder.parse(inputSource);
  +      docBuilder.setErrorHandler(new SAXErrorHandler());      
  +      docBuilder.setEntityResolver(new Log4jEntityResolver());        
  +      // we change the system ID to a valid URI so that Crimson won't
  +      // complain. Indeed, "log4j.dtd" alone is not a valid URI which
  +      // causes Crimson to barf. The Log4jEntityResolver only cares
  +      // about the "log4j.dtd" ending.
  +      inputSource.setSystemId("dummy://log4j.dtd");
  +      Document doc = docBuilder.parse(inputSource); 
         parse(doc.getDocumentElement());
       } catch (Exception e) {
         // I know this is miserable...
  
  
  
  1.26      +8 -0      jakarta-log4j/tests/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/tests/build.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- build.xml 4 Feb 2003 06:55:39 -0000       1.25
  +++ build.xml 3 Mar 2003 15:24:03 -0000       1.26
  @@ -338,6 +338,14 @@
       </junit>
     </target>
   
  +  <target name="MazeAppender" depends="build, cleanOutputDir">
  +    <junit printsummary="yes" fork="yes" haltonfailure="yes">
  +      <classpath refid="tests.classpath"/>
  +      <formatter type="plain" usefile="false" />
  +      <test name="org.apache.log4j.MazeAppenderTestCase" />
  +    </junit>
  +  </target>
  +
   
     <target name="OR" depends="build, cleanOutputDir">
       <junit printsummary="yes" fork="yes" haltonfailure="yes">
  
  
  
  1.5       +13 -0     
jakarta-log4j/tests/src/java/org/apache/log4j/xml/XMLLayoutTestCase.java
  
  Index: XMLLayoutTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/xml/XMLLayoutTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLLayoutTestCase.java    13 Nov 2002 16:44:58 -0000      1.4
  +++ XMLLayoutTestCase.java    3 Mar 2003 15:24:03 -0000       1.5
  @@ -75,6 +75,18 @@
       assertTrue(Compare.compare(FILTERED, "witness/xmlLayout.3"));
     }
   
  +  public void testNull() throws Exception {
  +    XMLLayout xmlLayout = new XMLLayout();
  +    root.addAppender(new FileAppender(xmlLayout, TEMP, false));
  +    logger.debug("hi");
  +    logger.debug(null);
  +    Exception e = new Exception((String) null);
  +    logger.debug("hi", e);
  +    Transformer.transform(TEMP, FILTERED, new Filter[] {new LineNumberFilter(),
  +                                                      new XMLTimestampFilter()});
  +    assertTrue(Compare.compare(FILTERED, "witness/xmlLayout.null"));
  +  }
  +
     void common() {
       int i = -1;
    
  @@ -108,6 +120,7 @@
       suite.addTest(new XMLLayoutTestCase("basic"));
       suite.addTest(new XMLLayoutTestCase("locationInfo"));
       suite.addTest(new XMLLayoutTestCase("testCDATA"));
  +    suite.addTest(new XMLLayoutTestCase("testNull"));
       return suite;
     }
   
  
  
  
  1.2       +29 -0     jakarta-log4j/tests/witness/xmlLayout.null
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to