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

  Modified:    src/main/org/jboss/mq/il/oil OILClientIL.java
  Log:
  Clean up the execessive logging by introducing trace level messages
  
  Revision  Changes    Path
  1.4       +15 -8     jbossmq/src/main/org/jboss/mq/il/oil/OILClientIL.java
  
  Index: OILClientIL.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILClientIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OILClientIL.java  2001/09/26 05:02:28     1.3
  +++ OILClientIL.java  2001/11/26 06:33:12     1.4
  @@ -18,6 +18,8 @@
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
  +
  +import org.jboss.logging.Logger;
   import org.jboss.mq.Connection;
   import org.jboss.mq.ReceiveRequest;
   
  @@ -29,12 +31,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 OILClientIL implements ClientIL, java.io.Serializable
   {
  -   static org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(OILClientIL.class);
  +   static Logger log = Logger.getLogger(OILClientIL.class);
      final static int m_close = 2;
      final static int m_deleteTemporaryDestination = 1;
      final static int m_receive = 3;
  @@ -104,18 +106,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");
      }
   
      /**
  @@ -142,7 +149,7 @@
      {
         try
         {
  -         cat.info("ConnectionReceiverOILClient is connecting to: " + 
addr.getHostAddress() + ":" + port);
  +         log.info("ConnectionReceiverOILClient is connecting to: " + 
addr.getHostAddress() + ":" + port);
            socket = new Socket(addr, port);
            out = new ObjectOutputStream(new 
BufferedOutputStream(socket.getOutputStream()));
            out.flush();
  @@ -150,7 +157,7 @@
         }
         catch (Exception e)
         {
  -         cat.debug(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