Class RotatingLogFile

    • Method Detail

      • getFile

        public File getFile()
        Return the backing file.
      • rotate

        public void rotate()
        Rotate this file.
      • compareTo

        public int compareTo​(RotatingLogFile o)
        Compares this log file to another file. It will return a negative number if this log file has a smaller version, a positive number if this log file a bigger version and 0 if they have the same version.
        Specified by:
        compareTo in interface Comparable<RotatingLogFile>
      • listFiles

        public static RotatingLogFile[] listFiles​(File directory,
                                                  String basename)
        List all log files inside some directory. The list returned is guaranteed to be in descending order, i.e. it is safe to rotate every file in turn without accidentally overwriting another one.
        Parameters:
        directory - parent directory
        basename - basename expected
        Returns:
        array of log files found