Omer Frenkel has posted comments on this change. Change subject: engine : Support logging of commands parameters ......................................................................
Patch Set 2: (2 comments) general comment: did you see/consider the existing infrastructure that is used in VdsBroker commands? it has a disadvantage that each parameters class need to override toString() in order to print its content, but on the other hand, you can control on what is printed and how it looks (consider trying to print special parameters like list or idk) also you can control printing per command (enable debug for a specific command, i don't think it will work here, since its in commandBase, so its all or nothing) and of course using existing working infra is always nice http://gerrit.ovirt.org/#/c/27780/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 1164: return getParameters().getTransactionScopeOption(); Line 1165: } Line 1166: Line 1167: private String getCommandParamatersString(T params) { Line 1168: final String GET = "get"; what about booleans that start with "is"? Line 1169: StringBuilder buf = new StringBuilder(); Line 1170: List<String> methodNames = ReflectionUtils.getMethodNames(params); Line 1171: methodNames.removeAll(ReflectionUtils.getMethodNames(new VdcActionParametersBase())); Line 1172: Line 1174: if (!methodName.startsWith(GET)) { Line 1175: continue; Line 1176: } Line 1177: Object retVal = ReflectionUtils.invokeMethodWithNoArgs(params, methodName); Line 1178: if (retVal == null) { this means that it will not show parameters that were sent with null? Line 1179: continue; Line 1180: } Line 1181: if (buf.length() > 0) { Line 1182: buf.append(", "); -- To view, visit http://gerrit.ovirt.org/27780 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfd9423e92f9f9c9a51eca24b20157cc32681018 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches