Skip to content

Commit

Permalink
discovery: Fix up log levels
Browse files Browse the repository at this point in the history
Log errors at "error" and dumps at "trace" level
  • Loading branch information
Sonic-Amiga committed Oct 9, 2020
1 parent dae5a1e commit c2209b7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@ private boolean receivePacketAndDiscover(DatagramSocket socket) {
String host = incomingPacket.getAddress().toString().substring(1);

logger.debug("Received reply from {}", host);
logger.debug(new String(incomingPacket.getData()));
logger.trace(new String(incomingPacket.getData()));

IdentProtocol.IdentData ident;

try {
ident = new IdentProtocol.IdentData(incomingPacket);
} catch (JSONException e) {
logger.debug("Malformed JSON reply!");
logger.error("Malformed JSON reply!");
return true;
}

// This check comes from Roomba980-Python
if (ident.ver < IdentData.MIN_SUPPORTED_VERSION) {
logger.debug("Found unsupported iRobot \"{}\" version {} at {}", ident.robotname, ident.ver, host);
logger.info("Found unsupported iRobot \"{}\" version {} at {}", ident.robotname, ident.ver, host);
return true;
}

Expand Down

0 comments on commit c2209b7

Please sign in to comment.