Skip to content

Commit

Permalink
Update logger levels and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pbogut committed Aug 21, 2020
1 parent 245e30b commit 1c6a420
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ public void handleCommand(ChannelUID channelUID, Command command) {
} catch (SocketTimeoutException e) {
logger.debug("EWPESmart: failed to send command to airconditioners due to Timeout, try no. {}", tryNo);
if (tryNo >= SEND_MESSAGE_TRIES) {
logger.warn("EWPESmart failed to update channel {} due to connection timeout after {} tries", channelUID.getId(), e.getMessage(), tryNo);
logger.warn("EWPESmart: failed to update channel {} due to connection timeout after {} tries", channelUID.getId(), tryNo);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"Could not control device due to multiple connection timeouts.");
break; // just give up
}
tryNo++;
} catch (Exception e) {
logger.warn("EWPESmart failed to update channel {} due to {} ", channelUID.getId(), e.getMessage());
logger.warn("EWPESmart: failed to update channel {} due to {} ", channelUID.getId(), e.getMessage());
updateStatus(ThingStatus.OFFLINE);
// e.printStackTrace();
break;
Expand Down Expand Up @@ -116,7 +116,7 @@ public void initialize() {
} catch (SocketTimeoutException e) {
logger.debug("EWPESmart: failed to scan for airconditioners due to Timeout, try no. {}", tryNo);
if (tryNo >= BIND_DEVICE_TRIES) {
logger.warn("EWPESmart failed to bind device thing.getUID() due to connection timeout after {} tries", e.getMessage(), tryNo);
logger.warn("EWPESmart: failed to bind device {} due to connection timeout after {} tries", thing.getUID(), tryNo);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"Could not bind device due to multiple connection timeouts.");
break; // just give up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void BindWithDevice(DatagramSocket clientSocket) throws Exception {
// Now set the key and flag to indicate the bind was succesful
mKey = bindResponseGson.packJson.key;

logger.warn("Key received: {}",mKey);
logger.debug("Key received: {}", mKey);

setIsBound(Boolean.TRUE);
}
Expand Down Expand Up @@ -542,7 +542,7 @@ protected void ExecuteCommand(DatagramSocket clientSocket, HashMap<String, Integ

Gson gson = new Gson();

logger.warn("Execute command");
logger.trace("Execute command");

// Convert the parameter map values to arrays
String[] keyArray = parameters.keySet().toArray(new String[0]);
Expand Down

0 comments on commit 1c6a420

Please sign in to comment.