avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output AsyncLogTarget.java
Date Thu, 13 Dec 2001 13:03:38 GMT
donaldp     01/12/13 05:03:38

  Modified:    src/java/org/apache/log/output AsyncLogTarget.java
  Log:
  Make sure LogTarget is opened so it can be written to.
  
  Make sure that the LogTarget delegated to cannot disrupt thread by throwing an exception.
  
  Submitted By: "Bachran, Michael" <MBachran@onebridge.de>
  
  Revision  Changes    Path
  1.7       +11 -2     jakarta-avalon-logkit/src/java/org/apache/log/output/AsyncLogTarget.java
  
  Index: AsyncLogTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/AsyncLogTarget.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AsyncLogTarget.java	2001/11/19 12:18:34	1.6
  +++ AsyncLogTarget.java	2001/12/13 13:03:38	1.7
  @@ -49,6 +49,7 @@
           m_logTarget = logTarget;
           m_list = new LinkedList();
           m_queueSize = queueSize;
  +        open();
       }
   
       /**
  @@ -145,8 +146,16 @@
                   }
               }
   
  -            //actually process an event
  -            m_logTarget.processEvent( event );
  +
  +            try 
  +            { 
  +                //actually process an event
  +                m_logTarget.processEvent( event );
  +            }
  +            catch( final Throwable throwable )
  +            {
  +                getErrorHandler().error( "Unknown error writing event.", throwable, event
);
  +            }
           }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message