directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r368507 - in /directory/trunks/dns-protocol/src/main/java/org/apache/dns: DnsServer.java protocol/DnsProtocolHandler.java
Date Thu, 12 Jan 2006 22:57:35 GMT
Author: elecharny
Date: Thu Jan 12 14:57:31 2006
New Revision: 368507

URL: http://svn.apache.org/viewcvs?rev=368507&view=rev
Log:
Updated the logs
- used the Message Format pattern

Modified:
    directory/trunks/dns-protocol/src/main/java/org/apache/dns/DnsServer.java
    directory/trunks/dns-protocol/src/main/java/org/apache/dns/protocol/DnsProtocolHandler.java

Modified: directory/trunks/dns-protocol/src/main/java/org/apache/dns/DnsServer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/dns-protocol/src/main/java/org/apache/dns/DnsServer.java?rev=368507&r1=368506&r2=368507&view=diff
==============================================================================
--- directory/trunks/dns-protocol/src/main/java/org/apache/dns/DnsServer.java (original)
+++ directory/trunks/dns-protocol/src/main/java/org/apache/dns/DnsServer.java Thu Jan 12 14:57:31
2006
@@ -61,7 +61,7 @@
             registry.bind( udpService, handler );
             registry.bind( tcpService, handler );
 
-            log.debug( name + " listening on port " + port );
+            log.debug( "{} listening on port {}", name, new Integer( port ) );
         }
         catch ( IOException ioe )
         {
@@ -84,6 +84,6 @@
         udpService = null;
         tcpService = null;
 
-        log.debug( config.getName() + " has stopped listening on port " + config.getPort()
);
+        log.debug( "{} has stopped listening on port {}", config.getName(), new Integer(
config.getPort() ) );
     }
 }

Modified: directory/trunks/dns-protocol/src/main/java/org/apache/dns/protocol/DnsProtocolHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/dns-protocol/src/main/java/org/apache/dns/protocol/DnsProtocolHandler.java?rev=368507&r1=368506&r2=368507&view=diff
==============================================================================
--- directory/trunks/dns-protocol/src/main/java/org/apache/dns/protocol/DnsProtocolHandler.java
(original)
+++ directory/trunks/dns-protocol/src/main/java/org/apache/dns/protocol/DnsProtocolHandler.java
Thu Jan 12 14:57:31 2006
@@ -49,10 +49,7 @@
 
     public void sessionCreated( IoSession session ) throws Exception
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " CREATED" );
-        }
+        log.debug( "{} CREATED", session.getRemoteAddress() );
         
         session.getFilterChain().addFirst(
                 "codec",
@@ -61,26 +58,17 @@
 
     public void sessionOpened( IoSession session )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " OPENED" );
-        }
+        log.debug( "{} OPENED", session.getRemoteAddress() );
     }
 
     public void sessionClosed( IoSession session )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " CLOSED" );
-        }
+        log.debug( "{} CLOSED", session.getRemoteAddress() );
     }
 
     public void sessionIdle( IoSession session, IdleStatus status )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " IDLE(" + status + ")" );
-        }
+        log.debug( "{} IDLE({})", session.getRemoteAddress(), status );
     }
 
     public void exceptionCaught( IoSession session, Throwable cause )
@@ -91,10 +79,7 @@
 
     public void messageReceived( IoSession session, Object message )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " RCVD: " + message );
-        }
+        log.debug( "{} RCVD: {}", session.getRemoteAddress(), message );
 
         DnsMessage request = (DnsMessage) message;
 
@@ -117,9 +102,6 @@
 
     public void messageSent( IoSession session, Object message )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " SENT: " + message );
-        }
+        log.debug( "{} SENT: {}", session.getRemoteAddress(), message );
     }
 }



Mime
View raw message