projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Formatting‧
[jFCPlib.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
fcp
/
FcpConnectionHandler.java
diff --git
a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java
b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java
index
dbf0969
..
fcceec7
100644
(file)
--- a/
src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java
+++ b/
src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java
@@
-22,6
+22,10
@@
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
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.
/**
* Handles an FCP connection to a node.
@@
-30,6
+34,9
@@
import java.nio.charset.Charset;
*/
class FcpConnectionHandler implements Runnable {
*/
class FcpConnectionHandler implements Runnable {
+ /** The logger. */
+ private static final Logger logger = Logging.getLogger(FcpConnectionHandler.class.getName());
+
/** The underlying connection. */
private final FcpConnection fcpConnection;
/** The underlying connection. */
private final FcpConnection fcpConnection;
@@
-70,7
+77,7
@@
class FcpConnectionHandler implements Runnable {
}
try {
String line = readLine();
}
try {
String line = readLine();
-
System.out.println("read line: " +
line);
+
logger.log(Level.FINEST, "read line: %1$s",
line);
if (line == null) {
break;
}
if (line == null) {
break;
}
@@
-93,7
+100,7
@@
class FcpConnectionHandler implements Runnable {
}
String field = line.substring(0, equalSign);
String value = line.substring(equalSign + 1);
}
String field = line.substring(0, equalSign);
String value = line.substring(equalSign + 1);
- assert fcpMessage != null: "fcp message is null";
+ assert fcpMessage != null
: "fcp message is null";
fcpMessage.setField(field, value);
} catch (IOException ioe1) {
throwable = ioe1;
fcpMessage.setField(field, value);
} catch (IOException ioe1) {
throwable = ioe1;