Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <[email protected]>
  • Loading branch information
mherwege committed Jun 12, 2023
1 parent 0c0f57d commit cc05b9c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private Switch createPlayerButtons() {
}
}
} catch (ItemNotFoundException e) {
logger.error("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
logger.warn("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
}

boolean considerTransform = false;
Expand Down Expand Up @@ -457,7 +457,7 @@ private Switch createPlayerButtons() {
label = label.trim();
int index = label.indexOf("[");
if (index >= 0) {
label = label.substring(0, label.indexOf("[") + 1) + formatPattern + "]";
label = label.substring(0, index + 1) + formatPattern + "]";
}
}
}
Expand Down Expand Up @@ -519,7 +519,7 @@ private QuantityType<?> convertStateToWidgetUnit(QuantityType<?> quantityState,
}

} catch (ItemNotFoundException e) {
logger.error("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
logger.warn("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
}

return pattern;
Expand Down Expand Up @@ -662,7 +662,7 @@ private String transform(String label, boolean matchTransform, @Nullable String
Item item = getItem(itemName);
return convertState(w, item, item.getState());
} catch (ItemNotFoundException e) {
logger.error("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
logger.warn("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
}
}
return UnDefType.UNDEF;
Expand Down Expand Up @@ -1262,7 +1262,7 @@ public boolean getVisiblity(Widget w) {
try {
item = itemRegistry.getItem(itemName);
} catch (ItemNotFoundException e) {
logger.error("Cannot retrieve visibility item {} for widget {}", rule.getItem(),
logger.warn("Cannot retrieve visibility item {} for widget {}", rule.getItem(),
w.eClass().getInstanceTypeName());

// Default to visible!
Expand Down Expand Up @@ -1393,7 +1393,7 @@ public void removeRegistryHook(RegistryHook<Item> hook) {
return numberItem.getUnitSymbol();
}
} catch (ItemNotFoundException e) {
logger.debug("Failed to retrieve item during widget rendering: {}", e.getMessage());
logger.warn("Failed to retrieve item during widget rendering, item does not exist: {}", e.getMessage());
}

return "";
Expand Down

0 comments on commit cc05b9c

Please sign in to comment.