Skip to content

Commit

Permalink
Fix logging (openhab#17119)
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Siepel <[email protected]>
  • Loading branch information
lsiepel authored Aug 12, 2024
1 parent b002fd7 commit 2bc890c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ public Optional<TVProperties> call() throws Exception {
// @Nullable
String response = HttpUtil.executeUrl("GET", uri.toURL().toString(), 500);
properties = Optional.ofNullable(new Gson().fromJson(response, TVProperties.class));
} catch (JsonSyntaxException | URISyntaxException | IOException e) {
} catch (IOException e) {
logger.debug("{}: Cannot connect to TV: {}", host, e.getMessage());
properties = Optional.empty();
} catch (JsonSyntaxException | URISyntaxException e) {
logger.warn("{}: Cannot connect to TV: {}", host, e.getMessage());
properties = Optional.empty();
}
Expand Down Expand Up @@ -229,7 +232,7 @@ public TVProperties fetchTVProperties(int ms, int retryCount) {
} catch (InterruptedException | ExecutionException e) {
logger.warn("{}: Cannot get TVProperties: {}", host, e.getMessage());
}
logger.warn("{}: Cannot get TVProperties, return Empty properties", host);
logger.debug("{}: Cannot get TVProperties, return Empty properties", host);
return new TVProperties();
}

Expand Down

0 comments on commit 2bc890c

Please sign in to comment.