Skip to content

Commit c020150

Browse files
JoaoJandredhslove
authored andcommitted
Improve volume backup restoration log (apache#11181)
1 parent a14d7fe commit c020150

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@
174174
import com.cloud.vm.dao.VMInstanceDetailsDao;
175175
import com.google.gson.Gson;
176176
import com.google.gson.reflect.TypeToken;
177+
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
178+
import org.apache.commons.lang3.builder.ToStringStyle;
177179

178180
public class BackupManagerImpl extends ManagerBase implements BackupManager {
179181

@@ -1534,7 +1536,7 @@ private boolean attachVolumeToVM(Long zoneId, String restoredVolumeLocation, Bac
15341536
HypervisorGuru guru = hypervisorGuruManager.getGuru(vm.getHypervisorType());
15351537
backupVolumeInfo.setType(Volume.Type.DATADISK);
15361538

1537-
logger.debug("Attaching the restored volume to VM {}", vm);
1539+
logger.info("Attaching the restored volume {} to VM {}.", () -> ReflectionToStringBuilder.toString(backupVolumeInfo, ToStringStyle.JSON_STYLE), () -> vm);
15381540
StoragePoolVO pool = primaryDataStoreDao.findByUuid(datastoreUuid);
15391541
try {
15401542
return guru.attachRestoredVolumeToVirtualMachine(zoneId, restoredVolumeLocation, backupVolumeInfo, vm, pool.getId(), backup);

0 commit comments

Comments
 (0)