且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

多处理中的Python登录:AttributeError:'Logger'对象没有属性'flush'

更新时间:2022-06-05 22:44:23

如果要替换sys.stdout,则必须使用 flush可以是无操作:

If you're replacing sys.stdout, it must be with a file-like object, which means you have to implement flush. flush can be a no-op:

def flush(self):
    pass