DaanHoogland commented on code in PR #8230:
URL: https://github.com/apache/cloudstack/pull/8230#discussion_r1474336236
##########
usage/src/main/java/com/cloud/usage/parser/VmDiskUsageParser.java:
##########
@@ -107,11 +109,10 @@ public static boolean parse(AccountVO account, Date
startDate, Date endDate) {
long bytesWrite = vmDiskInfo.getBytesWrite();
if ((ioRead > 0L) || (ioWrite > 0L) || (bytesRead > 0L) ||
(bytesWrite > 0L)) {
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Creating vm disk usage record, io read:" +
toHumanReadableSize(ioRead) + ", io write: " + toHumanReadableSize(ioWrite) +
", bytes read:" + toHumanReadableSize(bytesRead) + ", bytes write: " +
- toHumanReadableSize(bytesWrite) + " for account: "
+ account.getId() + " in availability zone " + vmDiskInfo.getZoneId() + ",
start: " + startDate + ", end: " +
- endDate);
- }
+ s_logger.debug(String.format("Creating vm disk usage record,
io read [%s], io write [%s], bytes read [%s], bytes write [%s], startDate [%s],
and endDate [%s], " +
Review Comment:
guard
##########
usage/src/main/java/com/cloud/usage/parser/VolumeUsageParser.java:
##########
@@ -152,10 +154,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 Volume usage record for vol: " + volId +
", usage: " + usageDisplay + ", startDate: " + startDate + ", endDate: " +
endDate +
- ", for account: " + account.getId());
- }
+ s_logger.debug(String.format("Creating Volume usage record for vol
[%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]