2017-08-09 61 views
0

环境旋转日志: 赢得10 蟒蛇2.7 Filebeat 5.1.1Filebeat防止蟒蛇在Windows操作系统旋转文件

我的应用程序与旋转日志处理程序写入日志。当我启动Filebeat时,我开始通过记录lib获取以下异常。

Traceback (most recent call last): 
File “C:\Anaconda2\Lib\logging\handlers.py”, line 77, in emit 
    self.doRollover() 
File “C:\Anaconda2\Lib\logging\handlers.py”, line 142, in 
doRollover 
    os.rename(self.baseFilename, dfn) 
WindowsError: [Error 183] Cannot create a file when that file already 
exists 

我该如何解决?

+0

没有[mcve]就难以猜测。你能设置一个极小的日志记录系统,用一个非常短的最大字节数来重现问题吗? –

回答

0

发布我的决心。

在Filebeat docs - 写,如果你有你应该使用windows旋转日志中的问题: close_renamed:真 close_removed:真

我尝试过,但没有奏效由于配置错误的压痕。 修复了它,现在我没有任何问题。