Create directory for logs backup

This commit is contained in:
Marc Baloup 2022-12-31 01:11:45 +01:00
parent 29c1aa21c9
commit a36b8ec1f2

View File

@ -57,6 +57,7 @@ public class RotatedLogsBackupProcess extends BackupProcess {
boolean success = false;
File targetDir = getTargetDir();
targetDir.mkdirs();
try {
List<File> filesToMove = getFilesToMove();
@ -65,7 +66,7 @@ public class RotatedLogsBackupProcess extends BackupProcess {
try {
Files.move(source, new File(targetDir, source.getName()));
} catch (IOException e) {
Log.severe("Unable to move file " + source + " into " + targetDir);
Log.severe("Unable to move file " + source + " into " + targetDir, e);
}
}