mirror of https://github.com/apache/cloudstack.git
Merge pull request #1705 from nemo9cby/CLOUDSTACK-9465
Made the changes to improve logging.CLOUSTACK-9465 Several log refactoring/improvement suggestions. There are two scenarios of logging which needs refactoring/improvement: Method invocation replaced by variable This means that in the logging code, the method invocation is pre-defined as a variable. for simplicity, the method invocation should be replaced by the variable. Delete variable which must be null The variable in the logging code is null, there is no need to put the variable there. * pr/1705: Made the changes to improve logging. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
b59db0dc06
|
|
@ -1231,9 +1231,9 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||
} else if (cmd instanceof PingCommand) {
|
||||
logD = false;
|
||||
s_logger.debug("Ping from " + hostId + "(" + hostName + ")");
|
||||
s_logger.trace("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
|
||||
s_logger.trace("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
|
||||
} else {
|
||||
s_logger.debug("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
|
||||
s_logger.debug("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3367,7 +3367,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
|||
}
|
||||
|
||||
if (fromHost.getClusterId().longValue() != dest.getCluster().getId()) {
|
||||
s_logger.info("Source and destination host are not in same cluster, unable to migrate to host: " + dest.getHost().getId());
|
||||
s_logger.info("Source and destination host are not in same cluster, unable to migrate to host: " + dstHostId);
|
||||
throw new CloudRuntimeException("Source and destination host are not in same cluster, unable to migrate to host: " + dest.getHost().getId());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class KVMHAChecker extends KVMHABase implements Callable<Boolean> {
|
|||
s_logger.debug("reture: " + result);
|
||||
s_logger.debug("parser: " + parser.getLine());
|
||||
if (result == null && parser.getLine().contains("> DEAD <")) {
|
||||
s_logger.debug("read heartbeat failed: " + result);
|
||||
s_logger.debug("read heartbeat failed: ");
|
||||
results.add(false);
|
||||
} else {
|
||||
results.add(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue