DaanHoogland commented on code in PR #8230:
URL: https://github.com/apache/cloudstack/pull/8230#discussion_r1474334117


##########
usage/src/main/java/com/cloud/usage/parser/SecurityGroupUsageParser.java:
##########
@@ -146,10 +148,9 @@ private static void createUsageRecord(int type, long 
runningTime, Date startDate
         DecimalFormat dFormat = new DecimalFormat("#.######");
         String usageDisplay = dFormat.format(usage);
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Creating security group:" + sgId + " usage record 
for Vm : " + vmId + ", usage: " + usageDisplay + ", startDate: " + startDate +
-                ", endDate: " + endDate + ", for account: " + account.getId());
-        }
+        s_logger.debug(String.format("Creating security group usage record for 
id [%s], vm [%s], usage [%s], startDate [%s], and endDate [%s], for account 
[%s].",

Review Comment:
   guard



##########
usage/src/main/java/com/cloud/usage/parser/StorageUsageParser.java:
##########
@@ -158,10 +160,9 @@ private static void createUsageRecord(long zoneId, int 
type, long runningTime, D
         DecimalFormat dFormat = new DecimalFormat("#.######");
         String usageDisplay = dFormat.format(usage);
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Creating Storage usage record for type: " + type + 
" with id: " + storageId + ", usage: " + usageDisplay + ", startDate: " + 
startDate +
-                ", endDate: " + endDate + ", for account: " + account.getId());
-        }
+        s_logger.debug(String.format("Creating Storage usage record for type 
[%s], with id [%s], usage [%s], startDate [%s], and endDate [%s], for account 
[%s].",

Review Comment:
   guard



-- 
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