Skip to content

Commit 6cca598

Browse files
committed
fix logs
1 parent c15cbb8 commit 6cca598

File tree

1 file changed

+4
-4
lines changed
  • plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam

1 file changed

+4
-4
lines changed

plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,16 @@ protected boolean checkIfRestoreSessionFinished(String type, String path) throws
376376
}
377377
if (session.getResult().equalsIgnoreCase("Failed")) {
378378
String sessionUid = session.getUid();
379-
LOG.error(String.format("Failed to restore backup [%s] of VM [%s] due to [%s].",
379+
logger.error("Failed to restore backup [{}] of VM [{}] due to [{}].",
380380
sessionUid, session.getVmDisplayName(),
381-
getRestoreVmErrorDescription(StringUtils.substringAfterLast(sessionUid, ":"))));
381+
getRestoreVmErrorDescription(StringUtils.substringAfterLast(sessionUid, ":")));
382382
throw new CloudRuntimeException(String.format("Restore job [%s] failed.", sessionUid));
383383
}
384-
LOG.debug(String.format("Waiting %s seconds, out of a total of %s seconds, for the backup process to finish.", j, restoreTimeout));
384+
logger.debug("Waiting {} seconds, out of a total of {} seconds, for the restore process to finish.", j, restoreTimeout);
385385
try {
386386
Thread.sleep(1000);
387387
} catch (InterruptedException ignored) {
388-
logger.trace(String.format("Ignoring InterruptedException [%s] when waiting for restore session finishes.", ignored.getMessage()));
388+
logger.trace("Ignoring InterruptedException [{}] when waiting for restore session finishes.", ignored.getMessage());
389389
}
390390
}
391391
throw new CloudRuntimeException("Related job type: " + type + " was not successful");

0 commit comments

Comments
 (0)