sureshanaparti commented on a change in pull request #5353:
URL: https://github.com/apache/cloudstack/pull/5353#discussion_r693902887
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7686,4 +7533,20 @@ private GetVmVncTicketAnswer
execute(GetVmVncTicketCommand cmd) {
return new GetVmVncTicketAnswer(null, false,
e.getLocalizedMessage());
}
}
-}
+
+ private String createLogMessageException(Throwable e, Command command) {
+ if (e instanceof RemoteException) {
+ s_logger.warn("Encounter remote exception to vCenter, invalidate
VMware session context.");
+ invalidateServiceContext();
+ }
+
+ String message = String.format("%s failed due to [%s].",
command.getClass().getSimpleName(), VmwareHelper.getExceptionMessage(e));
+ s_logger.error(message, e);
+
+ return message;
+ }
+
+ private void logInDebugCommand(Command cmd) {
+ s_logger.debug(String.format("Executing resource command %s: [%s].",
cmd.getClass().getName(), getHumanReadableBytesJson(_gson.toJson(cmd))));
Review comment:
this method for logging is being called for few cmds only, but there is
a trace log already at _executeRequest(Command cmd)_ which logs for all cmds,
you can add the json cmd to the log there
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]