[Improvement] set cancel as APINoSee, and log it if happened
package org.zstack.header.message;
import org.zstack.header.errorcode.ErrorCode;
+import org.zstack.header.rest.APINoSee;
+import org.zstack.utils.Utils;
+import org.zstack.utils.logging.CLogger;
public class MessageReply extends Message {
+ private static final CLogger logger = Utils.getLogger(MessageReply.class);
+
/**
* @desc indicate the failure or success. Client should evaluate this field before evaluating
* inventory field
@@ -13,6 +18,7 @@ public class MessageReply extends Message {
/**
* @desc sometimes we just cancel this msg execution, neither success or failed
*/
+ @APINoSee
private boolean canceled = false;
/**
* @desc indicate the reason of api failure. It presents only if success = false
@@ -42,6 +48,7 @@ public class MessageReply extends Message {
}
public void setCanceled(ErrorCode error) {
+ logger.debug(String.format("message has been canceled, [correlationId=%s]", getCorrelationId()));
this.error = error;
this.canceled = true;
this.setSuccess(false);
