Skip to content

Commit

Permalink
Supress unecessary logging (openhab#17050)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
  • Loading branch information
mlobstein authored and digitaldan committed Aug 29, 2024
1 parent f358cdb commit c5b0d83
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public void stopRunning() {
if (isRunning.getAndSet(false)) {
try {
if (!running.await(5, TimeUnit.SECONDS)) {
logger.warn("Waited too long for response reader to finish");
logger.debug("Waited too long for response reader to finish");
}
} catch (InterruptedException e) {
// Do nothing
Expand Down Expand Up @@ -321,7 +321,7 @@ public void stopRunning() {
if (processingThread != null && Thread.currentThread() != processingThread) {
try {
if (!running.await(5, TimeUnit.SECONDS)) {
logger.warn("Waited too long for dispatcher to finish");
logger.debug("Waited too long for dispatcher to finish");
}
} catch (InterruptedException e) {
// do nothing
Expand Down Expand Up @@ -358,7 +358,7 @@ public void run() {
listener.responseReceived(stringResponse);
}
} catch (Exception e) {
logger.warn("Exception occurred processing the response '{}': ", response, e);
logger.debug("Exception occurred processing the response '{}': ", response, e);
}
} else if (response instanceof Exception exceptionResponse) {
logger.debug("Dispatching exception: {}", response);
Expand All @@ -368,7 +368,7 @@ public void run() {
listener.responseException(exceptionResponse);
}
} else {
logger.warn("Unknown response class: {}", response);
logger.debug("Unknown response class: {}", response);
}
}
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ private void retryConnect() {
if (retryConnection == null) {
final AtlonaPro3Config config = getAtlonaConfig();
if (config != null) {
logger.info("Will try to reconnect in {} seconds", config.getRetryPolling());
logger.debug("Will try to reconnect in {} seconds", config.getRetryPolling());
retryConnection = this.scheduler.schedule(() -> {
retryConnection = null;
connect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,10 @@ private void handlePowerResponse(Matcher m, String resp) {
AtlonaPro3Constants.CHANNEL_POWER), OnOffType.OFF);
break;
default:
logger.warn("Invalid power response: '{}'", resp);
logger.debug("Invalid power response: '{}'", resp);
}
} else {
logger.warn("Invalid power response: '{}'", resp);
logger.debug("Invalid power response: '{}'", resp);
}
}

Expand All @@ -790,7 +790,7 @@ private void handleVersionResponse(Matcher m, String resp) {
version = m.group(1);
callback.setProperty(AtlonaPro3Constants.PROPERTY_VERSION, version);
} else {
logger.warn("Invalid version response: '{}'", resp);
logger.debug("Invalid version response: '{}'", resp);
}
}

Expand All @@ -808,7 +808,7 @@ private void handleTypeResponse(Matcher m, String resp) {
modelType = resp;
callback.setProperty(AtlonaPro3Constants.PROPERTY_TYPE, modelType);
} else {
logger.warn("Invalid Type response: '{}'", resp);
logger.debug("Invalid Type response: '{}'", resp);
}
}

Expand Down Expand Up @@ -845,13 +845,13 @@ private void handlePortPowerResponse(Matcher m, String resp) {
portNbr, AtlonaPro3Constants.CHANNEL_PORTPOWER), OnOffType.OFF);
break;
default:
logger.warn("Invalid port power response: '{}'", resp);
logger.debug("Invalid port power response: '{}'", resp);
}
} catch (NumberFormatException e) {
logger.warn("Invalid port power (can't parse number): '{}'", resp);
logger.debug("Invalid port power (can't parse number): '{}'", resp);
}
} else {
logger.warn("Invalid port power response: '{}'", resp);
logger.debug("Invalid port power response: '{}'", resp);
}
}

Expand Down Expand Up @@ -885,7 +885,7 @@ private void handlePortOutputResponse(Matcher m, String resp) {
callback.stateChanged(AtlonaPro3Utilities.createChannelID(AtlonaPro3Constants.GROUP_PORT, outPort,
AtlonaPro3Constants.CHANNEL_PORTOUTPUT), new DecimalType(inPort));
} catch (NumberFormatException e) {
logger.warn("Invalid port output response (can't parse number): '{}'", resp);
logger.debug("Invalid port output response (can't parse number): '{}'", resp);
}
}
}
Expand Down Expand Up @@ -918,10 +918,10 @@ private void handleMirrorResponse(Matcher m, String resp) {
hdmiPortNbr, AtlonaPro3Constants.CHANNEL_PORTMIRRORENABLED), OnOffType.ON);
}
} catch (NumberFormatException e) {
logger.warn("Invalid mirror response (can't parse number): '{}'", resp);
logger.debug("Invalid mirror response (can't parse number): '{}'", resp);
}
} else {
logger.warn("Invalid mirror response: '{}'", resp);
logger.debug("Invalid mirror response: '{}'", resp);
}
}

Expand All @@ -941,10 +941,10 @@ private void handleUnMirrorResponse(Matcher m, String resp) {
callback.stateChanged(AtlonaPro3Utilities.createChannelID(AtlonaPro3Constants.GROUP_MIRROR, hdmiPortNbr,
AtlonaPro3Constants.CHANNEL_PORTMIRROR), new DecimalType(0));
} catch (NumberFormatException e) {
logger.warn("Invalid unmirror response (can't parse number): '{}'", resp);
logger.debug("Invalid unmirror response (can't parse number): '{}'", resp);
}
} else {
logger.warn("Invalid unmirror response: '{}'", resp);
logger.debug("Invalid unmirror response: '{}'", resp);
}
}

Expand All @@ -965,10 +965,10 @@ private void handleVolumeResponse(Matcher m, String resp) {
callback.stateChanged(AtlonaPro3Utilities.createChannelID(AtlonaPro3Constants.GROUP_VOLUME, portNbr,
AtlonaPro3Constants.CHANNEL_VOLUME), new DecimalType(level));
} catch (NumberFormatException e) {
logger.warn("Invalid volume response (can't parse number): '{}'", resp);
logger.debug("Invalid volume response (can't parse number): '{}'", resp);
}
} else {
logger.warn("Invalid volume response: '{}'", resp);
logger.debug("Invalid volume response: '{}'", resp);
}
}

Expand All @@ -995,13 +995,13 @@ private void handleVolumeMuteResponse(Matcher m, String resp) {
portNbr, AtlonaPro3Constants.CHANNEL_VOLUME_MUTE), OnOffType.OFF);
break;
default:
logger.warn("Invalid volume mute response: '{}'", resp);
logger.debug("Invalid volume mute response: '{}'", resp);
}
} catch (NumberFormatException e) {
logger.warn("Invalid volume mute (can't parse number): '{}'", resp);
logger.debug("Invalid volume mute (can't parse number): '{}'", resp);
}
} else {
logger.warn("Invalid volume mute response: '{}'", resp);
logger.debug("Invalid volume mute response: '{}'", resp);
}
}

Expand Down

0 comments on commit c5b0d83

Please sign in to comment.