User: starksm 
  Date: 01/11/25 22:33:12

  Modified:    src/main/org/jboss/mq/il/uil UILClientIL.java
  Log:
  Clean up the execessive logging by introducing trace level messages
  
  Revision  Changes    Path
  1.4       +14 -8     jbossmq/src/main/org/jboss/mq/il/uil/UILClientIL.java
  
  Index: UILClientIL.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/uil/UILClientIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UILClientIL.java  2001/09/26 05:02:28     1.3
  +++ UILClientIL.java  2001/11/26 06:33:12     1.4
  @@ -16,9 +16,10 @@
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  +
  +import org.jboss.logging.Logger;
   import org.jboss.mq.Connection;
   import org.jboss.mq.ReceiveRequest;
  -
   import org.jboss.mq.SpyDestination;
   import org.jboss.mq.il.ClientIL;
   import org.jboss.mq.il.uil.multiplexor.SocketMultiplexor;
  @@ -28,13 +29,12 @@
    *
    * @author    Norbert Lataille ([EMAIL PROTECTED])
    * @author    Hiram Chirino ([EMAIL PROTECTED])
  - * @version   $Revision: 1.3 $
  + * @version   $Revision: 1.4 $
    * @created   August 16, 2001
    */
   public class UILClientIL implements ClientIL, java.io.Serializable
   {
  -
  -   static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(UILClientIL.class);
  +   static Logger log = Logger.getLogger(UILClientIL.class);
      final static int m_close = 2;
      final static int m_deleteTemporaryDestination = 1;
      final static int m_receive = 3;
  @@ -92,18 +92,23 @@
      public synchronized void receive(ReceiveRequest messages[])
             throws Exception
      {
  -      cat.debug("Checking socket");
  +      boolean trace = log.isTraceEnabled();
  +      if( trace )
  +         log.trace("Checking socket");
         checkSocket();
  -      cat.debug("Writing request");
  +      if( trace )
  +         log.trace("Writing request");
         out.writeByte(m_receive);
         out.writeInt(messages.length);
         for (int i = 0; i < messages.length; ++i)
         {
            messages[i].writeExternal(out);
         }
  -      cat.debug("Waiting for awnser");
  +      if( trace )
  +         log.trace("Waiting for awnser");
         waitAnswer();
  -      cat.debug("Done");
  +      if( trace )
  +         log.trace("Done");
      }
   
      /**
  @@ -136,6 +141,7 @@
         }
         catch (Exception e)
         {
  +         log.debug("Cannot connect to the ConnectionReceiver/Server", e);
            throw new RemoteException("Cannot connect to the 
ConnectionReceiver/Server");
         }
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to