Repository: incubator-edgent Updated Branches: refs/heads/master 2eb5897da -> 1e9a9066d
[Edgent-374] log warnings on controlCmd lookup failures Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/20eb829b Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/20eb829b Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/20eb829b Branch: refs/heads/master Commit: 20eb829bbd537a2dece94b88586b0f4a28b2aa9d Parents: 66b6861 Author: Dale LaBossiere <dlab...@us.ibm.com> Authored: Wed Feb 1 14:59:41 2017 -0500 Committer: Dale LaBossiere <dlab...@us.ibm.com> Committed: Wed Feb 1 14:59:41 2017 -0500 ---------------------------------------------------------------------- .../edgent/runtime/jsoncontrol/JsonControlService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/20eb829b/runtime/jsoncontrol/src/main/java/org/apache/edgent/runtime/jsoncontrol/JsonControlService.java ---------------------------------------------------------------------- diff --git a/runtime/jsoncontrol/src/main/java/org/apache/edgent/runtime/jsoncontrol/JsonControlService.java b/runtime/jsoncontrol/src/main/java/org/apache/edgent/runtime/jsoncontrol/JsonControlService.java index 983287d..780e173 100644 --- a/runtime/jsoncontrol/src/main/java/org/apache/edgent/runtime/jsoncontrol/JsonControlService.java +++ b/runtime/jsoncontrol/src/main/java/org/apache/edgent/runtime/jsoncontrol/JsonControlService.java @@ -156,8 +156,10 @@ public class JsonControlService implements ControlService { mbean = mbeans.get(controlId); } - if (mbean == null) + if (mbean == null) { + logger.warn("Unable to find mbean for control id: {}", controlId); return new JsonPrimitive(Boolean.FALSE); + } String methodName = request.get(OP_KEY).getAsString(); @@ -173,8 +175,10 @@ public class JsonControlService implements ControlService { Method method = findMethod(mbean.getControlInterface(), methodName, argumentCount); - if (method == null) + if (method == null) { + logger.warn("Unable to find method \"{}\" with {} args in {}", methodName, argumentCount, mbean.getControlInterface().getName()); return new JsonPrimitive(Boolean.FALSE); + } logger.trace("Execute operation - control id: {} method: {}", controlId, methodName);