Alissa Bonas has uploaded a new change for review.

Change subject: core: improve logs in several classes
......................................................................

core: improve logs in several classes

remove class name from log statement because it's logged anyway
switch from errorFormat to error when there are no parameters to fill
fix mispelling (VSD to VDS)

Change-Id: Id15f1c19f20c7dbd67f4bfa804840f9de9757bf2
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
3 files changed, 12 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/93/10993/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
index 96d41ea..bdc6822 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
@@ -81,7 +81,7 @@
     @OnTimerMethodAnnotation("ovfUpdate_timer")
     public void ovfUpdate_timer() {
         itemsCountPerUpdate = reloadConfigValue();
-        log.info("OvfDataUpdater: Attempting to update VMs/Templates Ovf.");
+        log.info("Attempting to update VMs/Templates Ovf.");
         List<storage_pool> storagePools = 
getStoragePoolDao().getAllByStatus(StoragePoolStatus.Up);
         for (storage_pool pool : storagePools) {
             try {
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
index 04e39f8..c761aa7 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVdsStatusVDSCommand.java
@@ -27,8 +27,7 @@
             _vdsManager.UpdateStatisticsData(vds.getStatisticsData());
 
             if (vds.getspm_status() != VdsSpmStatus.None && 
parameters.getStatus() != VDSStatus.Up) {
-                log.infoFormat("SetVdsStatusVDSCommand::VSD {0} is spm and 
moved from up calling ResetIrs.",
-                        vds.getvds_name());
+                log.infoFormat("VDS {0} is spm and moved from up calling 
ResetIrs.",vds.getvds_name());
                 // check if this host was spm and reset if do.
                 getVDSReturnValue().setSucceeded(
                         ResourceManager
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
index 99e0dc5..7861fa4 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
@@ -871,7 +871,7 @@
             }
             throw command.getVDSReturnValue().getExceptionObject();
         } else {
-            log.errorFormat("refreshCapabilities:GetCapabilitiesVDSCommand 
failed with no exception!");
+            log.error("GetCapabilitiesVDSCommand failed with no exception!");
         }
     }
 
@@ -976,7 +976,7 @@
 
     /**
      * gets VM full information for the given list of VMs
-     * @param vmIds
+     * @param vmsToUpdate
      * @return
      */
     protected XmlRpcStruct[] getVmInfo(List<String> vmsToUpdate) {
@@ -1011,7 +1011,7 @@
      */
     private void processVmDevices(XmlRpcStruct vm) {
         if (vm == null || vm.getItem(VdsProperties.vm_guid) == null) {
-            log.errorFormat("Received NULL VM or VM id when processing VM 
devices, abort.");
+            log.error("Received NULL VM or VM id when processing VM devices, 
abort.");
             return;
         }
         Guid vmId = new Guid((String) vm.getItem(VdsProperties.vm_guid));
@@ -1324,7 +1324,7 @@
                         if (runningVm.getdisplay() != null) {
                             _poweringUpVms.add(runningVm);
                         } else {
-                            
log.errorFormat("VdsBroker.VdsUpdateRunTimeInfo.updateRepository - 
runningVm.display is null, cannot start spice for it");
+                            log.error("UpdateRepository - runningVm.display is 
null, cannot start spice for it");
                         }
                     }
 
@@ -1473,7 +1473,7 @@
         if (runningVm.getstatus() == VMStatus.MigratingTo) {
             // in migration
             log.infoFormat(
-                    "vds::refreshVmList vm id '{0}' is migrating to vds '{1}' 
ignoring it in the refresh until migration is done",
+                    "RefreshVmList vm id '{0}' is migrating to vds '{1}' 
ignoring it in the refresh until migration is done",
                     runningVm.getId(),
                     _vds.getvds_name());
             returnValue = true;
@@ -1483,7 +1483,7 @@
             if (vmDynamic != null && vmDynamic.getrun_on_vds() != null
                     && !vmDynamic.getrun_on_vds().equals(_vds.getId()) && 
runningVm.getstatus() != VMStatus.Up) {
                 log.infoFormat(
-                        "vds::refreshVmList vm id '{0}' status = {1} on vds 
{2} ignoring it in the refresh until migration is done",
+                        "RefreshVmList vm id '{0}' status = {1} on vds {2} 
ignoring it in the refresh until migration is done",
                         runningVm.getId(),
                         runningVm.getstatus(),
                         _vds.getvds_name());
@@ -1498,7 +1498,7 @@
 
         if (oldVmStatus == VMStatus.MigratingFrom && 
runningVm.getstatus().isGuestUp()) {
             _vmsToRerun.add(runningVm.getId());
-            log.infoFormat("adding VM {0} to re-run list", runningVm.getId());
+            log.infoFormat("Adding VM {0} to re-run list", runningVm.getId());
             vmToUpdate.setMigratingToVds(null);
         }
     }
@@ -1541,7 +1541,7 @@
             _saveVdsDynamic = true;
             _saveVdsStatistics = true;
             log.infoFormat(
-                    "vds::Updated vds status from 'Preparing for Maintenance' 
to 'Maintenance' in database,  vds = {0} : {1}",
+                    "Updated vds status from 'Preparing for Maintenance' to 
'Maintenance' in database,  vds = {0} : {1}",
                     _vds.getId(),
                     _vds.getvds_name());
         }
@@ -1698,7 +1698,7 @@
     /**
      * Add or update vmStatistics to save list
      *
-     * @param vmDynamic
+     * @param vmStatistics
      */
     private void addVmStatisticsToList(VmStatistics vmStatistics) {
         _vmStatisticsToSave.put(vmStatistics.getId(), vmStatistics);
@@ -1714,7 +1714,7 @@
     /**
      * Add or update vmDynamic to save list
      *
-     * @param vmDynamic
+     * @param vmDevice
      */
     private void addVmDeviceToList(VmDevice vmDevice) {
         vmDeviceToSave.put(vmDevice.getId(), vmDevice);


--
To view, visit http://gerrit.ovirt.org/10993
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id15f1c19f20c7dbd67f4bfa804840f9de9757bf2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to