mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
More logging to debug the reliability layer.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
package net.sf.briar.plugins.modem;
|
package net.sf.briar.plugins.modem;
|
||||||
|
|
||||||
import static java.util.logging.Level.FINE;
|
import static java.util.logging.Level.INFO;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -32,6 +32,8 @@ class SlipDecoder implements ReadHandler {
|
|||||||
reset(true);
|
reset(true);
|
||||||
} else {
|
} else {
|
||||||
if(decodedLength > 0) {
|
if(decodedLength > 0) {
|
||||||
|
if(LOG.isLoggable(INFO))
|
||||||
|
LOG.info("Decoded " + decodedLength + " bytes");
|
||||||
byte[] decoded = new byte[decodedLength];
|
byte[] decoded = new byte[decodedLength];
|
||||||
System.arraycopy(buf, 0, decoded, 0, decodedLength);
|
System.arraycopy(buf, 0, decoded, 0, decodedLength);
|
||||||
readHandler.handleRead(decoded);
|
readHandler.handleRead(decoded);
|
||||||
@@ -73,7 +75,7 @@ class SlipDecoder implements ReadHandler {
|
|||||||
|
|
||||||
private void reset(boolean error) {
|
private void reset(boolean error) {
|
||||||
if(error) {
|
if(error) {
|
||||||
if(LOG.isLoggable(FINE))
|
if(LOG.isLoggable(INFO))
|
||||||
LOG.fine("Decoding error after " + decodedLength + " bytes");
|
LOG.fine("Decoding error after " + decodedLength + " bytes");
|
||||||
}
|
}
|
||||||
escape = false;
|
escape = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user