ceki        02/04/30 08:56:35

  Modified:    .        build.xml
               docs     HISTORY
               src/java/org/apache/log4j/spi LoggingEvent.java
               src/xdocs contactUs.xml
  Log:
  Fixed #5932 in LoggingEvent.getMDCCopy
  
  Cosmetic changes in contactUs.xml
  
  Revision  Changes    Path
  1.33      +9 -3      jakarta-log4j/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/build.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- build.xml 26 Apr 2002 16:11:41 -0000      1.32
  +++ build.xml 30 Apr 2002 15:56:34 -0000      1.33
  @@ -174,6 +174,7 @@
                            ${stem}/net/JMS*.java,
                            ${stem}/jmx/*.java,
                            ${stem}/or/jms/*.java"
  +         deprecation="${deprecation}"
            debug="on">
         <classpath refid="compile.classpath"/>
       </javac>
  @@ -187,7 +188,8 @@
           includes="examples/**/*.java"
           classpath="${classpath}"
           excludes="misc/*"
  -         debug="on"/>
  +        deprecation="${deprecation}"
  +           debug="on"/>
       <rmic base="${javac.dest}"
         classname="examples.NumberCruncherServer"
         />
  @@ -199,6 +201,7 @@
           includes="${stem}/xml/**/*.java"
              excludes="${stem}/xml/examples/doc-files/**.java,
                     ${stem}/xml/Transform.java"
  +        deprecation="${deprecation}"
           classpath="${classpath}">
         <classpath refid="compile.classpath"/>
       </javac>
  @@ -210,13 +213,15 @@
                  if="javamail-present">
       <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
  +        deprecation="${deprecation}"
           includes="${stem}/net/SMTPAppender.java">
         <classpath refid="compile.classpath"/>
       </javac>
     </target>
   
     <target name="build.jms" depends="init, jms, jndi" if="jms-present">
  -    <javac srcdir="${java.source.dir}"
  +    <javac deprecation="${deprecation}"
  +           srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/net/JMS*.java">
         <classpath refid="compile.classpath"/>
  @@ -224,7 +229,8 @@
     </target>
   
    <target name="build.jmx" depends="init, jmx, jndi" if="jmx-present">
  -    <javac srcdir="${java.source.dir}"
  +    <javac deprecation="${deprecation}"
  +           srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/jmx/*.java"
              excludes="${stem}/jmx/T.java">
  
  
  
  1.93      +4 -0      jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- HISTORY   25 Apr 2002 21:18:14 -0000      1.92
  +++ HISTORY   30 Apr 2002 15:56:34 -0000      1.93
  @@ -13,6 +13,10 @@
      XMLLayout also outputs each item of a stack trace in a separate
      line. [*]
   
  + - Fixed bug #5932 as suggested by Heikki Linnakangas. The
  +   LoggingEvent.getMDCCopy method now clones the MDC instead of just
  +   referencing it. [*]
  +
    (rc1)
   
     - The ANT build script was modified to use jar files specified in
  
  
  
  1.29      +14 -7     jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- LoggingEvent.java 24 Apr 2002 01:16:11 -0000      1.28
  +++ LoggingEvent.java 30 Apr 2002 15:56:34 -0000      1.29
  @@ -198,19 +198,24 @@
   
   
     /**
  -      Retrung the the context corresponding to the <code>key</code>
  +      Returns the the context corresponding to the <code>key</code>
         parameter. If there is a local MDC copy (probably from a remote
  -      machine, the search try it first, if that fails then search this
  -      thread's <code>MDC</code>.
  -   */
  +      machine, the we use it, if that fails then the current thread's
  +      <code>MDC</code> is used. 
  +      
  +      <p>Note that <em>both</em> the local MDC copy and the current
  +      thread's MDC are searched.
  +
  +  */
     public
     Object getMDC(String key) {
       Object r;
  -
  +    // Note the mdcCopy is used if it exists. Otherwise we use the MDC
  +    // that is associated with the thread.
       if(mdcCopy != null) {
         r = mdcCopy.get(key);
         if(r != null) {
  -     return r;
  +        return r;
         }
       }
       return MDC.get(key);
  @@ -223,7 +228,9 @@
     void getMDCCopy() {
       if(mdcLookupRequired) {
         ndcLookupRequired = false;
  -      mdcCopy = MDC.getContext();
  +      // the clone call is required for asynchronous logging.
  +      // See also bug #5932.
  +      mdcCopy = (Hashtable) MDC.getContext().clone();
       }
     }
   
  
  
  
  1.13      +12 -14    jakarta-log4j/src/xdocs/contactUs.xml
  
  Index: contactUs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/xdocs/contactUs.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- contactUs.xml     30 Apr 2002 13:57:51 -0000      1.12
  +++ contactUs.xml     30 Apr 2002 15:56:34 -0000      1.13
  @@ -70,22 +70,20 @@
   
       <section name="Bug reporting">
   
  -      <p>Bugs should be reported by using the 
  -     <a href="http://nagoya.apache.org/bugzilla";>Apache Bug Database</a>.
  +      <p>Bugs should be reported by using the <a
  +     href="http://nagoya.apache.org/bugzilla";>Apache Bug
  +     Database</a>. Before reporting a problem, please make sure to
  +     <a href="http://nagoya.apache.org/bugzilla/query.cgi";>check
  +     the database</a> and the <a href="HISTORY">project history
  +     file</a> to see if the problem is not already known. Before
  +     filing a report, you should first send email to the
  +     <em>log4j-user</em> mailing list describing the bug. Only
  +     after these precautionary steps should you file a bug report
  +     with Bugzilla.
         </p>
   
  -      <p>Before reporting a problem, please make sure to <a
  -       href="http://nagoya.apache.org/bugzilla/query.cgi";>check the
  -       database</a> and the <a href="HISTORY">project history
  -       file</a> to see if the problem is not already known. Before
  -       filing a report, you should first send email to the
  -       <em>log4j-user</em> mailing list describing the bug. Only
  -       after these precautionary steps should you file a bug
  -       report. 
  -      </p>
  -
  -      <p>Although Bugzilla allows users to flag enhancement requests
  -      as such, enhancement requests are not bugs and should not be
  +      <p>Although Bugzilla allows users to file enhancement requests
  +      as bugs, enhancement requests are not bugs and should not be
         treated as such. The preferred way to request for
         enhancements is by posting on the log4j-user list. This
         allows other interested parties to participate in the ensuing
  
  
  

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

Reply via email to