提交 04641a3d 编写于 作者: B Baptiste Mathus

Reduce Log levels

Not that critical, but still can keep them as we should
generally be on FS that support atomic moves. Hence not
enter that catch.

If proved otherwise, we'll reconsider adjusting this verbosity.
上级 927192fc
......@@ -157,20 +157,20 @@ public class AtomicFileWriter extends Writer {
}
if (destPath.toFile().exists()) {
LOGGER.log(Level.WARNING, "The target file {0} was already existing?!?", destPath);
LOGGER.log(Level.INFO, "The target file {0} was already existing", destPath);
}
try {
Files.move(tmpPath, destPath, StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e1) {
e1.addSuppressed(e);
LOGGER.log(Level.SEVERE, "Unable to move {0} to {1}. Attempting to delete {0} and abandoning.",
LOGGER.log(Level.WARNING, "Unable to move {0} to {1}. Attempting to delete {0} and abandoning.",
new Path[]{tmpPath, destPath});
try {
Files.deleteIfExists(tmpPath);
} catch (IOException e2) {
e2.addSuppressed(e1);
LOGGER.log(Level.SEVERE, "Unable to delete {0}, good bye then!", tmpPath);
LOGGER.log(Level.WARNING, "Unable to delete {0}, good bye then!", tmpPath);
throw e2;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册