Skip to content

Commit 3674e80

Browse files
GutoVeroneziDaniel Augusto Veronezi Salvador
andauthored
Improve logs on SecondaryStorageManagerImpl and few refactors (#4955)
Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
1 parent cb16707 commit 3674e80

File tree

4 files changed

+223
-295
lines changed

4 files changed

+223
-295
lines changed

engine/schema/src/main/java/com/cloud/dc/DataCenterVO.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,4 +471,10 @@ public void setIp6Dns2(String ip6Dns2) {
471471
public PartitionType partitionType() {
472472
return PartitionType.Zone;
473473
}
474+
475+
@Override
476+
public String toString() {
477+
return String.format("Zone {\"id\": \"%s\", \"name\": \"%s\", \"uuid\": \"%s\"}", id, name, uuid);
478+
}
479+
474480
}

engine/schema/src/main/java/com/cloud/vm/VMInstanceVO.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,9 @@ public void setRemoved(Date removed) {
504504
this.removed = removed;
505505
}
506506

507-
transient String toString;
508-
509507
@Override
510508
public String toString() {
511-
if (toString == null) {
512-
toString = new StringBuilder("VM[").append(type.toString()).append("|").append(getInstanceName()).append("]").toString();
513-
}
514-
return toString;
509+
return String.format("VM instance {\"id\": \"%s\", \"name\": \"%s\", \"uuid\": \"%s\", \"type\"=\"%s\"}", id, getInstanceName(), uuid, type);
515510
}
516511

517512
@Override

0 commit comments

Comments
 (0)