Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bondhome] Suppress warning messages #15129

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void sendBPUPKeepAlive() {
@Nullable
String bondId = response.bondId;
if (bondId == null || !bondId.equalsIgnoreCase(bridgeHandler.getBridgeId())) {
logger.warn("Response isn't from expected Bridge! Expected: {} Got: {}",
logger.trace("Response isn't from expected Bridge! Expected: {} Got: {}",
bridgeHandler.getBridgeId(), bondId);
} else {
bridgeHandler.setBridgeOnline(inPacket.getAddress().getHostAddress());
Expand Down Expand Up @@ -201,7 +201,7 @@ private void processPacket(DatagramPacket packet) {
BPUPUpdate update = transformUpdatePacket(packet);
if (update != null) {
if (!update.bondId.equalsIgnoreCase(bridgeHandler.getBridgeId())) {
logger.warn("Response isn't from expected Bridge! Expected: {} Got: {}", bridgeHandler.getBridgeId(),
logger.trace("Response isn't from expected Bridge! Expected: {} Got: {}", bridgeHandler.getBridgeId(),
update.bondId);
}

Expand Down Expand Up @@ -236,7 +236,7 @@ private void processPacket(DatagramPacket packet) {
try {
response = this.gsonBuilder.fromJson(responseJson, BPUPUpdate.class);
} catch (JsonParseException e) {
logger.warn("Error parsing json! {}", e.getMessage());
logger.debug("Error parsing json! {}", e.getMessage());
}
return response;
}
Expand Down Expand Up @@ -277,7 +277,7 @@ private void datagramSocketHealthRoutine() {
this.socket = s;
logger.trace("Datagram Socket reconnected using port {}.", s.getPort());
} catch (SocketException exception) {
logger.warn("Problem creating new socket : {}", exception.getLocalizedMessage());
logger.trace("Problem creating new socket : {}", exception.getLocalizedMessage());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public synchronized void executeDeviceAction(String deviceId, BondDeviceAction a
try {
response = request.send();
} catch (Exception e) {
logger.warn("Unable to execute device action {} against device {}: {}", deviceId, action, e.getMessage());
logger.debug("Unable to execute device action {} against device {}: {}", deviceId, action, e.getMessage());
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected synchronized void startScan() {
}
}
} catch (BondException ignored) {
logger.warn("Error getting devices for discovery: {}", ignored.getMessage());
logger.debug("Error getting devices for discovery: {}", ignored.getMessage());
} finally {
removeOlderResults(getTimestampOfLastScan());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void forwardUpdateToThing(BPUPUpdate pushUpdate) {
logger.trace("could not read topic type from push update or type was not state.");
}
} else {
logger.warn("Can not read device Id from push update.");
logger.trace("Cannot read device Id from push update.");
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ public void setBridgeOffline(ThingStatusDetail detail, String description) {
*/
public void setBridgeOnline(String bridgeAddress) {
if (!config.isValid()) {
logger.warn("Configuration error, cannot set the bridghe online without configuration");
logger.warn("Configuration error, cannot set the bridge online without configuration");
return;
} else if (!config.ipAddress.equals(bridgeAddress)) {
logger.debug("IP address of Bond {} has changed to {}", config.serialNumber, bridgeAddress);
Expand Down