directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r368500 - in /directory/trunks/changepw-protocol/src/main/java/org/apache/changepw: ChangePasswordServer.java protocol/ChangePasswordProtocolHandler.java service/ProcessPasswordChange.java
Date Thu, 12 Jan 2006 22:43:18 GMT
Author: elecharny
Date: Thu Jan 12 14:43:10 2006
New Revision: 368500

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

Modified:
    directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/ChangePasswordServer.java
    directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/protocol/ChangePasswordProtocolHandler.java
    directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/service/ProcessPasswordChange.java

Modified: directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/ChangePasswordServer.java?rev=368500&r1=368499&r2=368500&view=diff
==============================================================================
--- directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/ChangePasswordServer.java
(original)
+++ directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/ChangePasswordServer.java
Thu Jan 12 14:43:10 2006
@@ -68,7 +68,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 )
         {
@@ -91,6 +91,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/changepw-protocol/src/main/java/org/apache/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/protocol/ChangePasswordProtocolHandler.java?rev=368500&r1=368499&r2=368500&view=diff
==============================================================================
--- directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/protocol/ChangePasswordProtocolHandler.java
(original)
+++ directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/protocol/ChangePasswordProtocolHandler.java
Thu Jan 12 14:43:10 2006
@@ -52,10 +52,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",
@@ -65,40 +62,28 @@
 
     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 )
     {
-        log.error( session.getRemoteAddress() + " EXCEPTION", cause );
+        log.debug( "{} EXCEPTION {}", session.getRemoteAddress(), cause);
         session.close();
     }
 
     public void messageReceived( IoSession session, Object message )
     {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( session.getRemoteAddress() + " RCVD: " + message );
-        }
+        log.debug( "{} RCVD: {}", session.getRemoteAddress(), message );
 
         InetAddress clientAddress = ( (InetSocketAddress) session.getRemoteAddress() ).getAddress();
         ChangePasswordRequest request = (ChangePasswordRequest) message;
@@ -125,7 +110,7 @@
     {
         if ( log.isDebugEnabled() )
         {
-            log.debug( session.getRemoteAddress() + " SENT: " + message );
+            log.debug( "{} SENT: {}", session.getRemoteAddress(), message );
         }
     }
 }

Modified: directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/service/ProcessPasswordChange.java
URL: http://svn.apache.org/viewcvs/directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/service/ProcessPasswordChange.java?rev=368500&r1=368499&r2=368500&view=diff
==============================================================================
--- directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/service/ProcessPasswordChange.java
(original)
+++ directory/trunks/changepw-protocol/src/main/java/org/apache/changepw/service/ProcessPasswordChange.java
Thu Jan 12 14:43:10 2006
@@ -53,7 +53,7 @@
         try
         {
             String principalName = store.changePassword( clientPrincipal, newKey );
-            log.debug( "Successfully modified principal " + principalName );
+            log.debug( "Successfully modified principal {}", principalName );
         }
         catch ( Exception e )
         {



Mime
View raw message