Maor Lipchuk has uploaded a new change for review.

Change subject: core: Added log when retrieving entities from tar
......................................................................

core: Added log when retrieving entities from tar

Adding a log for the retrieve of entities process so it will be easier
to understand the flow throw the engine log file.

Change-Id: I11b1102b64c6951376a5242364435515b41d24fb
Signed-off-by: Maor Lipchuk <[email protected]>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/30206/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
index 4bf9475..f2f3890 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
@@ -68,6 +68,7 @@
         List<OvfEntityData> ovfEntityDataFromTar = new ArrayList<>();
         InputStream is = new ByteArrayInputStream(tar);
 
+        log.infoFormat("Start fetching OVF files from tar file");
         Map<String, ByteBuffer> filesFromTar;
         try (TarInMemoryExport memoryTar = new TarInMemoryExport(is)) {
             filesFromTar = memoryTar.unTar();
@@ -96,10 +97,18 @@
                                 getEntityName(ovfData),
                                 archType,
                                 getEntityId(fileEntry.getKey()));
+                log.infoFormat("Retrieve OVF Entity from storage domain ID {0} 
for entity ID {1}, entity name {2} and VM Type of {3}",
+                        storageDomainId,
+                        getEntityId(fileEntry.getKey()),
+                        getEntityName(ovfData),
+                        vmType.name());
                 ovfEntityDataFromTar.add(ovfEntityData);
+            } else {
+                log.infoFormat("File {0} is not an OVF file, will be 
ignored.", fileEntry.getKey());
             }
         }
-
+        log.infoFormat("Finish to fetch OVF files from tar file. The number of 
OVF entities are {0}",
+                ovfEntityDataFromTar.size());
         return ovfEntityDataFromTar;
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11b1102b64c6951376a5242364435515b41d24fb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to