Class BackupUtil
- java.lang.Object
-
- com.elvishew.xlog.internal.printer.file.backup.BackupUtil
-
public class BackupUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BackupUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbackup(java.io.File loggingFile, BackupStrategy2 backupStrategy)Shift existed backups if needed, and backup the logging file.static voidverifyBackupStrategy(BackupStrategy2 backupStrategy)Check if aBackupStrategy2is valid, will throw a exception if invalid.
-
-
-
Method Detail
-
backup
public static void backup(java.io.File loggingFile, BackupStrategy2 backupStrategy)Shift existed backups if needed, and backup the logging file.- Parameters:
loggingFile- the logging filebackupStrategy- the strategy should be use when backing up
-
verifyBackupStrategy
public static void verifyBackupStrategy(BackupStrategy2 backupStrategy)
Check if aBackupStrategy2is valid, will throw a exception if invalid.- Parameters:
backupStrategy- the backup strategy to be verify
-
-