[ https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444635#comment-16444635 ]
ASF subversion and git services commented on CLOUDSTACK-10357: -------------------------------------------------------------- Commit fed3492b57625f415df556b5e2e44efee2257f50 in cloudstack's branch refs/heads/master from lzh3636 [ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=fed3492 ] CLOUDSTACK-10357: Improve log messages in methods (#2580) Fix several logs that mismatch method. Add stacktraces for throw new statements. > Log messages that do not match with their method function > --------------------------------------------------------- > > Key: CLOUDSTACK-10357 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Zhenhao Li > Priority: Minor > Labels: easyfix > > There are some possible copy and paste errors in the log messages (The > logging statement was copied from an old place to a new place, but the > message wasn't changed to adapt to the function of new place) which may cause > confusion when operators are reading the log messages. > > Here is a list of the related logging statements: > *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", > e);* > *Callsites:* > * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_ > * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* > > *2. s_logger.debug("Failed to retrive the default label for management > traffic:" + "zone: " ...* > *Callsites:* > * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*, > * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()* > > *3. s_logger.error("Can not find the groupid " + groupId + " for scaling > up");* > *Callsites:* > * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_ > * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()* > > *4. s_logger.warn("No DNS entry found during configuration of > NfsSecondaryStorage");* > *Callsites:* > * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_ > * > org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure() > > *5. s_logger.trace("vCenter API trace - searchDatastore() done");* > *Callsites:* > * > com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*, > * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()* > > *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");* > *Callsites:* > * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*, > * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()* > > *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...* > *Callsites:* > * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(), > * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(), > > *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents > " + logMessage);* > *Callsites:* > * > com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*, > * > com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*, > > *9. LOG.error("Failed to remove group due to:", e);* > *Callsites:* > * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_ > * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()* > > *10. s_logger.warn("Unable to initialize inaccurate clock", e);* > *Callsites:* > * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(), > * com.cloud.network.resource.*NuageVspResource*.stop() > > *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());* > *Callsites:* > * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_ > * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()* > > *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);* > *Callsites:* > * > org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*, > * > org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()* > > > > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)