Maintaining code - review log levels 10/12310/1
authorMarian Adamjak <marian.adamjak@pantheon.sk>
Wed, 29 Oct 2014 08:22:47 +0000 (09:22 +0100)
committerMarian Adamjak <marian.adamjak@pantheon.sk>
Wed, 29 Oct 2014 08:23:44 +0000 (09:23 +0100)
Change-Id: Ic43628ee1067e112e8c6e1cf21ff9f9a32b0e000
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/connection/SwitchConnectionProviderImpl.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDatagramPacketDecoder.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDecoder.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/SslTrustManagerFactory.java
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpChannelInitializer.java

index 002343d75d1c3a82b0dac3fe23d922e913817e63..aadddd6b62a0f42a875be5d4ceb8913b36543d37 100644 (file)
@@ -98,7 +98,7 @@ public class SwitchConnectionProviderImpl implements SwitchConnectionProvider {
     public ListenableFuture<Boolean> shutdown() {
         LOGGER.debug("Shutdown summoned");
         if(serverFacade == null){
-            LOGGER.debug("Can not shutdown - not configured or started");
+            LOGGER.warn("Can not shutdown - not configured or started");
             throw new IllegalStateException("SwitchConnectionProvider is not started or not configured.");
         }
         return serverFacade.shutdown();
index d2d228bfc772c46baf7d3e90ce0beb7f3cc85328..5dea0bc6c1edc90ae466be0f3f7996f155b5f552 100644 (file)
@@ -44,8 +44,8 @@ public class OFDatagramPacketDecoder extends SimpleChannelInboundHandler<Version
                 consumer.consume(dataObject);\r
             }\r
         } catch(Exception e) {\r
-            LOGGER.error("Message deserialization failed");\r
-            LOGGER.error(e.getMessage(), e);\r
+            LOGGER.warn("Message deserialization failed");\r
+            LOGGER.warn(e.getMessage(), e);\r
             // TODO: delegate exception to allow easier deserialization\r
             // debugging / deserialization problem awareness\r
         } finally {\r
index 450eb4bb1757909d407ee06d424289cbea497e2e..6cf140503a62e8df93aa63cc9d112c5f890e74a3 100644 (file)
@@ -53,8 +53,8 @@ public class OFDecoder extends MessageToMessageDecoder<VersionMessageWrapper> {
                 out.add(dataObject);
             }
         } catch(Exception e) {
-            LOGGER.error("Message deserialization failed");
-            LOGGER.error(e.getMessage(), e);
+            LOGGER.warn("Message deserialization failed");
+            LOGGER.warn(e.getMessage(), e);
             // TODO: delegate exception to allow easier deserialization
             // debugging / deserialization problem awareness
         } finally {
index 6890234cd49055219077b2836c8b27697dfdb9ce..14f970ccb9a46a1a3b651548a0041aa44ae6111f 100644 (file)
@@ -37,12 +37,12 @@ public class SslTrustManagerFactory extends TrustManagerFactorySpi {
 
         @Override
         public void checkClientTrusted(X509Certificate[] chain, String authType) {
-            LOGGER.error("UNKNOWN CLIENT CERTIFICATE: " + chain[0].getSubjectDN());
+            LOGGER.warn("UNKNOWN CLIENT CERTIFICATE: {}", chain[0].getSubjectDN());
         }
 
         @Override
         public void checkServerTrusted(X509Certificate[] chain, String authType) {
-            LOGGER.error("UNKNOWN SERVER CERTIFICATE: " + chain[0].getSubjectDN());
+            LOGGER.warn("UNKNOWN SERVER CERTIFICATE: {}", chain[0].getSubjectDN());
         }
     };
 
index c1a9c43c702be0e0ac0b6232fd5cfc21c124331f..b93a641ddaa3e6c4f4dc375daf58547cd9a9047f 100644 (file)
@@ -57,14 +57,14 @@ public class TcpChannelInitializer extends ProtocolChannelInitializer<SocketChan
         InetAddress switchAddress = ch.remoteAddress().getAddress();
         int port = ch.localAddress().getPort();
         int remotePort = ch.remoteAddress().getPort();
-        LOGGER.info("Incoming connection from (remote address): " + switchAddress.toString()
+        LOGGER.debug("Incoming connection from (remote address): " + switchAddress.toString()
                 + ":" + remotePort + " --> :" + port);
         if (!getSwitchConnectionHandler().accept(switchAddress)) {
             ch.disconnect();
-            LOGGER.info("Incoming connection rejected");
+            LOGGER.debug("Incoming connection rejected");
             return;
         }
-        LOGGER.info("Incoming connection accepted - building pipeline");
+        LOGGER.debug("Incoming connection accepted - building pipeline");
         allChannels.add(ch);
         ConnectionFacade connectionFacade = null;
         connectionFacade = connectionAdapterFactory.createConnectionFacade(ch, null);
@@ -98,7 +98,7 @@ public class TcpChannelInitializer extends ProtocolChannelInitializer<SocketChan
                 connectionFacade.fireConnectionReadyNotification();
             }
         } catch (Exception e) {
-            LOGGER.error("Failed to initialize channel", e);
+            LOGGER.warn("Failed to initialize channel", e);
             ch.close();
         }
     }