User: fleury  
  Date: 00/09/29 15:05:46

  Modified:    src/main/org/jboss/logging Log.java
  Log:
  Fixed thread-inherited loggers. This time it actually works...
  
  Revision  Changes    Path
  1.4       +15 -2     jboss/src/main/org/jboss/logging/Log.java
  
  Index: Log.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/Log.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Log.java  2000/09/29 21:33:45     1.3
  +++ Log.java  2000/09/29 22:05:45     1.4
  @@ -17,7 +17,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class Log
   {
  @@ -31,7 +31,20 @@
      Object source = null;
      
      // Static --------------------------------------------------------
  -   static ThreadLocal currentLog = new InheritableThreadLocal();
  +//   static ThreadLocal currentLog = new ThreadLocal();
  +   
  +   static ThreadLocal currentLog = new InheritableThreadLocal()
  +   {
  +             // Child threads should get same stack, but only a copy of it
  +             public Object childValue(Object obj)
  +             {
  +                     if (obj != null)
  +                             return ((Stack)obj).clone();
  +                     else    
  +                             return null;
  +             }
  +   };
  +   
      static Log defaultLog = new Log();
      
      public static void setLog(Log log)
  
  
  

Reply via email to