slavkap commented on code in PR #7889:
URL: https://github.com/apache/cloudstack/pull/7889#discussion_r1416866111


##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -193,7 +193,7 @@ protected Answer copyObject(DataObject srcData, DataObject 
destData, Host destHo
                      destData.getType() == DataObjectType.TEMPLATE)) {
                     // volume transfer from primary to secondary. Volume 
transfer between primary pools are already handled by copyVolumeBetweenPools
                     // Delete cache in order to certainly transfer a latest 
image.
-                    s_logger.debug("Delete " + cacheType + " cache(id: " + 
cacheId +
+                    if (s_logger.isTraceEnabled()) s_logger.trace("Delete " + 
cacheType + " cache(id: " + cacheId +

Review Comment:
   here as well, switch level to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -205,15 +205,15 @@ protected Answer copyObject(DataObject srcData, 
DataObject destData, Host destHo
                                       ", uuid: " + cacheUuid + ")");
                         cacheMgr.deleteCacheObject(srcForCopy);
                     } else {
-                        s_logger.debug("Decrease reference count of " + 
cacheType +
+                        if (s_logger.isTraceEnabled()) 
s_logger.trace("Decrease reference count of " + cacheType +

Review Comment:
   switch level to debug, and here



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -331,7 +331,7 @@ protected Answer cloneVolume(DataObject template, 
DataObject volume) {
             }
             return answer;
         } catch (Exception e) {
-            s_logger.debug("Failed to send to storage pool", e);
+            if (s_logger.isTraceEnabled()) s_logger.trace("Failed to send to 
storage pool", e);

Review Comment:
   switch to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -388,7 +388,7 @@ protected Answer copyVolumeBetweenPools(DataObject srcData, 
DataObject destData)
 
                 if (answer == null || !answer.getResult()) {
                     if (answer != null) {
-                        s_logger.debug("copy to image store failed: " + 
answer.getDetails());
+                        if (s_logger.isTraceEnabled()) s_logger.trace("copy to 
image store failed: " + answer.getDetails());

Review Comment:
   switch to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -507,7 +513,7 @@ public void copyAsync(DataObject srcData, DataObject 
destData, Host destHost, As
         Answer answer = null;
         String errMsg = null;
         try {
-            s_logger.debug("copyAsync inspecting src type " + 
srcData.getType().toString() + " copyAsync inspecting dest type " + 
destData.getType().toString());
+            if (s_logger.isTraceEnabled()) s_logger.trace("copyAsync 
inspecting src type " + srcData.getType().toString() + " copyAsync inspecting 
dest type " + destData.getType().toString());

Review Comment:
   switch to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -532,7 +543,7 @@ public void copyAsync(DataObject srcData, DataObject 
destData, Host destHost, As
                 errMsg = answer.getDetails();
             }
         } catch (Exception e) {
-            s_logger.debug("copy failed", e);
+            if (s_logger.isTraceEnabled()) s_logger.trace("copy failed", e);

Review Comment:
   switch to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -126,8 +126,8 @@ protected boolean needCacheStorage(DataObject srcData, 
DataObject destData) {
         if (destStoreTO instanceof NfsTO || destStoreTO.getRole() == 
DataStoreRole.ImageCache) {
             return false;
         }
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("needCacheStorage true, dest at " + 
destTO.getPath() + " dest role " + destStoreTO.getRole().toString() + 
srcTO.getPath() + " src role " +
+        if (s_logger.isTraceEnabled()) {

Review Comment:
   I'm sorry, @rg9975, I had to be more specific with my previous review. Can 
you return the log level to `debug` on the whole file? 
   For maintainers, it will be more accessible when troubleshooting especially 
on production env.



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -411,7 +411,7 @@ protected Answer copyVolumeBetweenPools(DataObject srcData, 
DataObject destData)
 
                 if (answer == null || !answer.getResult()) {
                     if (answer != null) {
-                        s_logger.debug("copy to primary store failed: " + 
answer.getDetails());
+                        if (s_logger.isTraceEnabled()) s_logger.trace("copy to 
primary store failed: " + answer.getDetails());

Review Comment:
   switch to debug



##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -627,7 +638,7 @@ protected Answer copySnapshot(DataObject srcData, 
DataObject destData) {
             }
             return answer;
         } catch (Exception e) {
-            s_logger.debug("copy snasphot failed: ", e);
+            if (s_logger.isTraceEnabled()) s_logger.trace("copy snasphot 
failed: ", e);

Review Comment:
   switch to debug also



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to