Skip to content

Commit

Permalink
Added missing logger args (openhab#5496)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Weitkamp <[email protected]>
Signed-off-by: Maximilian Hess <[email protected]>
  • Loading branch information
cweitkamp authored and ne0h committed Sep 15, 2019
1 parent c99e344 commit dffad24
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private void messageReceive(String message) {
} else if (model.equalsIgnoreCase("AT-UHD-PRO3-1616M")) {
typeId = THING_TYPE_PRO3_1616M;
} else {
logger.warn("Unknown model #: {}");
logger.warn("Unknown model #: {}", model);
}

if (typeId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void dispose() {
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (command == null) {
logger.warn("Command passed to handler for thing {} is null");
logger.warn("Command passed to handler for thing {} is null", thingID());
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private String getPlayerName() {
private synchronized MinecraftServerHandler getBridgeHandler() {
Bridge bridge = getBridge();
if (bridge == null) {
logger.debug("Required bridge not defined for device {}.");
logger.debug("Required bridge not defined for device {}.", getThing().getUID());
return null;
} else {
return getBridgeHandler(bridge);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private void updateSignState(SignData sign) {
private synchronized MinecraftServerHandler getBridgeHandler() {
Bridge bridge = getBridge();
if (bridge == null) {
logger.debug("Required bridge not defined for device {}.");
logger.debug("Required bridge not defined for device {}.", getThing().getUID());
return null;
} else {
return getBridgeHandler(bridge);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public void initialize() {
logger.debug("Adding {} with ID '{}' as device data listener, result: {}", getClass().getSimpleName(),
getId(), success);
} else {
logger.debug("Unable to add {} with ID '{}' as device data listener because bridge is null");
logger.debug("Unable to add {} with ID '{}' as device data listener because bridge is null",
getClass().getSimpleName(), getId());
}

updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "Waiting for refresh");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private void sendCommand(final SilvercrestWifiSocketRequestType type) {
address = InetAddress.getByName(this.hostAddress);
this.sendRequestPacket(new SilvercrestWifiSocketRequest(this.macAddress, type, this.vendor), address);
} catch (UnknownHostException e) {
logger.debug("Host Address not found: {}. Will lookup Mac address.");
logger.debug("Host Address not found: {}. Will lookup Mac address.", this.hostAddress);
this.hostAddress = null;
this.lookupForSocketHostAddress();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void updateStatus(ThingStatus status) {
private synchronized VitotronicBridgeHandler getBridgeHandler() {
Bridge bridge = getBridge();
if (bridge == null) {
logger.debug("Required bridge not defined for device {}.");
logger.debug("Required bridge not defined for device {}.", getThing().getUID());
return null;
} else {
return getBridgeHandler(bridge);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private void handleUnsubscribe(HttpServletResponse resp, String adapterName) thr
api.getDeviceKeys().remove(uid);
NeeoUtil.write(resp, gson.toJson(ReturnStatus.SUCCESS));
} catch (IllegalArgumentException e) {
logger.debug("AdapterName {} is not a valid thinguid - ignoring");
logger.debug("AdapterName {} is not a valid thinguid - ignoring", adapterName);
NeeoUtil.write(resp, gson.toJson(new ReturnStatus("AdapterName not a valid ThingUID: " + adapterName)));
}
}
Expand All @@ -358,7 +358,7 @@ private void handleSubscribe(HttpServletResponse resp, String adapterName, Strin
api.getDeviceKeys().put(uid, deviceKey);
NeeoUtil.write(resp, gson.toJson(ReturnStatus.SUCCESS));
} catch (IllegalArgumentException e) {
logger.debug("AdapterName {} is not a valid thinguid - ignoring");
logger.debug("AdapterName {} is not a valid thinguid - ignoring", adapterName);
NeeoUtil.write(resp, gson.toJson(new ReturnStatus("AdapterName not a valid ThingUID: " + adapterName)));
}
}
Expand All @@ -377,7 +377,7 @@ private void handleDirectory(HttpServletRequest req, HttpServletResponse resp, P
Objects.requireNonNull(resp, "resp cannot be null");
Objects.requireNonNull(pathInfo, "pathInfo cannot be null");

logger.debug("handleDirectory{}: {}", pathInfo);
logger.debug("handleDirectory {}", pathInfo);

final NeeoDevice device = context.getDefinitions().getDevice(pathInfo.getThingUid());
if (device != null) {
Expand Down

0 comments on commit dffad24

Please sign in to comment.