Use logging for debug output.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 20 Nov 2009 08:26:41 +0000 (09:26 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 20 Nov 2009 08:26:41 +0000 (09:26 +0100)
src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java

index dbf0969..4d27038 100644 (file)
@@ -22,6 +22,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import net.pterodactylus.util.logging.Logging;
 
 /**
  * Handles an FCP connection to a node.
@@ -30,6 +34,9 @@ import java.nio.charset.Charset;
  */
 class FcpConnectionHandler implements Runnable {
 
+       /** The logger. */
+       private static final Logger logger = Logging.getLogger(FcpConnectionHandler.class.getName());
+
        /** The underlying connection. */
        private final FcpConnection fcpConnection;
 
@@ -70,7 +77,7 @@ class FcpConnectionHandler implements Runnable {
                        }
                        try {
                                String line = readLine();
-                               System.out.println("read line: " + line);
+                               logger.log(Level.FINEST, "read line: %1$s", line);
                                if (line == null) {
                                        break;
                                }