[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nemo Chen updated CLOUDSTACK-9465:
----------------------------------
    Attachment:     (was: CLOUDSTACK-9465.patch)

> Several log refactoring/improvement suggestions
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-9465
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9465
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.9.0
>            Reporter: Nemo Chen
>              Labels: easyfix, easytet
>         Attachments: CLOUDSTACK-9465.001.patch
>
>
> *method invocation replaced by variable*
> file: 
> apache-cloudstack-4.9.0-src/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
> void processRequest (final Link link, final Request request)
> {code}final long hostId=attache.getId(){code}
> {code}s_logger.trace("SeqA " + attache.getId() + "-"+ request.getSequence()+ 
> ": Processing "+ request);{code}
> file: 
> apache-cloudstack-4.9.0-src/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
> method: void orchestrateMigrateForScale (final String vmUuid, final long 
> srcHostId, final DeployDestination dest, final Long oldSvcOfferingId)
> {code}final long dstHostId = dest.getHost().getId();{code}
> {code}s_logger.info("Source and destination host are not in same cluster, 
> unable to migrate to host: " + dest.getHost().getId());{code}
> The method invocations in above examples are assigned to variables before, we 
> should replace the method invocation with the variable for simpliciy and 
> readabiliy of logs.
> ----
> *Delete variable which must be null*
> apache-cloudstack-4.9.0-src/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java
> Boolean checkingHB ()
> {code}s_logger.debug("read heartbeat failed: " + result);{code}
> In the above example, the variable is null in the log. There is no need to 
> print the invalid variable in the logs. Suggestion: delete the variable in 
> the logs to avoid confusion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to