aboutsummaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-04-24 15:47:56 +0200
committergjoranv <gv@verizonmedia.com>2020-04-25 02:24:37 +0200
commit545c7069fbf76932542f80a25aab44fdc972925a (patch)
treedd6aac41e9568cc68ba1f46c0c38609f0f7604bb /filedistribution
parentee9e892838733da49d5ea2b74e456751c05c3f18 (diff)
LogLevel.ERROR -> Level.SEVERE
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
index b18b415931b..875058b2eff 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java
@@ -80,7 +80,7 @@ public class FileReceiver {
inprogressFile = Files.createTempFile(tmpDirectory.toPath(), fileName, ".inprogress").toFile();
} catch (IOException e) {
String msg = "Failed creating temp file for inprogress file for " + fileName + " in '" + tmpDirectory.toPath() + "': ";
- log.log(LogLevel.ERROR, msg + e.getMessage(), e);
+ log.log(Level.SEVERE, msg + e.getMessage(), e);
throw new RuntimeException(msg, e);
}
}
@@ -96,7 +96,7 @@ public class FileReceiver {
try {
Files.write(inprogressFile.toPath(), part, StandardOpenOption.WRITE, StandardOpenOption.APPEND);
} catch (IOException e) {
- log.log(LogLevel.ERROR, "Failed writing to file (" + inprogressFile.toPath() + "): " + e.getMessage(), e);
+ log.log(Level.SEVERE, "Failed writing to file (" + inprogressFile.toPath() + "): " + e.getMessage(), e);
inprogressFile.delete();
throw new RuntimeException("Failed writing to file (" + inprogressFile.toPath() + "): ", e);
}
@@ -120,14 +120,14 @@ public class FileReceiver {
try {
Files.createDirectories(fileReferenceDir.toPath());
} catch (IOException e) {
- log.log(LogLevel.ERROR, "Failed creating directory (" + fileReferenceDir.toPath() + "): " + e.getMessage(), e);
+ log.log(Level.SEVERE, "Failed creating directory (" + fileReferenceDir.toPath() + "): " + e.getMessage(), e);
throw new RuntimeException("Failed creating directory (" + fileReferenceDir.toPath() + "): ", e);
}
log.log(Level.FINE, () -> "Uncompressed file, moving to " + file.getAbsolutePath());
moveFileToDestination(inprogressFile, file);
}
} catch (IOException e) {
- log.log(LogLevel.ERROR, "Failed writing file: " + e.getMessage(), e);
+ log.log(Level.SEVERE, "Failed writing file: " + e.getMessage(), e);
throw new RuntimeException("Failed writing file: ", e);
} finally {
try {
@@ -135,7 +135,7 @@ public class FileReceiver {
Files.delete(inprogressFile.toPath());
}
} catch (IOException e) {
- log.log(LogLevel.ERROR, "Failed deleting " + inprogressFile.getAbsolutePath() + ": " + e.getMessage(), e);
+ log.log(Level.SEVERE, "Failed deleting " + inprogressFile.getAbsolutePath() + ": " + e.getMessage(), e);
}
}
return file;
@@ -197,7 +197,7 @@ public class FileReceiver {
deleteFileOrDirectory(tempFile);
} catch (IOException e) {
String message = "Failed moving file '" + tempFile.getAbsolutePath() + "' to '" + destination.getAbsolutePath() + "'";
- log.log(LogLevel.ERROR, message, e);
+ log.log(Level.SEVERE, message, e);
throw new RuntimeException(message, e);
}
}