Skip to content

Commit cc45bff

Browse files
nikam14DaanHooglandGutoVeronezi
authored
Improved concatenation way in PropertiesStorage.java (#7486)
Co-authored-by: dahn <daan.hoogland@gmail.com> Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
1 parent 267a457 commit cc45bff

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

agent/src/main/java/com/cloud/agent/dao/impl/PropertiesStorage.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,14 @@ public synchronized boolean configure(String name, Map<String, Object> params) {
9292
file = new File(path);
9393
try {
9494
if (!file.createNewFile()) {
95-
s_logger.error("Unable to create _file: " + file.getAbsolutePath());
95+
s_logger.error(String.format("Unable to create _file: %s", file.getAbsolutePath()));
9696
return false;
9797
}
9898
} catch (IOException e) {
99-
s_logger.error("Unable to create _file: " + file.getAbsolutePath(), e);
99+
s_logger.error(String.format("Unable to create file: %s", file.getAbsolutePath()));
100+
if (s_logger.isDebugEnabled()) {
101+
s_logger.debug(String.format("IOException while trying to create file: %s", file.getAbsolutePath()), e);
102+
}
100103
return false;
101104
}
102105
}

0 commit comments

Comments
 (0)