Filebeat防止python旋转日志在windows操作系统中旋转文件

Filebeat防止python旋转日志在windows操作系统中旋转文件,python,windows,logging,filebeat,Python,Windows,Logging,Filebeat,环境: 赢10分 python 2.7 Filebeat 5.1.1 我的应用程序使用旋转日志处理程序写入日志。当我启动Filebeat时,我开始从日志库中获取以下异常 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”, li

环境: 赢10分 python 2.7 Filebeat 5.1.1

我的应用程序使用旋转日志处理程序写入日志。当我启动Filebeat时,我开始从日志库中获取以下异常

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
我如何解决它?

发布我的解决方案

在Filebeat中-如果您在windows中旋转日志时遇到问题,则应使用: close_重命名为:true close_removed:真

我试过了,但由于配置中的缩进错误,它没有工作。 修复了它,现在我没有任何问题。

没有问题很难猜测。你能用一个很短的最大字节值设置一个最小的日志系统来重现这个问题吗?