def _determine_rotated_logfile(self):
rotated_filename = self._check_rotated_filename_candidates()<EOL>if rotated_filename and exists(rotated_filename):<EOL><INDENT>if stat(rotated_filename).st_ino == self._offset_file_inode:<EOL><INDENT>return rotated_filename<EOL><DEDENT>if stat(self.filename).st_ino == self._offset_file_inode:<EOL><INDENT>if self.copytruncate:<EOL><INDENT>return rotated_filename<EOL><DEDENT>else:<EOL><INDENT>sys.stderr.write(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" %<EOL>(self.filename, self._offset, stat(self.filename).st_size))<EOL><DEDENT><DEDENT><DEDENT>return None<EOL>
We suspect the logfile has been rotated, so try to guess what the
rotated filename is, and return it.