read_rz(输入1,输入你日志的相对目录),就会得到你日志的最近一行文件:
def read_rz(x, y): b = -1 * abs(x) a = open(y, 'rb') while True: a.seek(b, 2) c = a.readlines() if len(c) > 1: print(c[-1].decode('utf-8')) break b *= 2