推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
billion
V2EX  ›  Python

求助: Python logging 报 WindowsError: [Error 32]

  •  
  •   billion ·
    kingname · Nov 12, 2015 · 4813 views
    This topic created in 3971 days ago, the information mentioned may be changed or developed.

    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - Logged from file Test_Util.py, line 33
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - Traceback (most recent call last):
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - File "C:\Python27\lib\logging\handlers.py", line 77, in emit
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - self.doRollover()
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - File "C:\Python27\lib\logging\handlers.py", line 350, in doRollover
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - os.rename(self.baseFilename, dfn)
    2015-11-12 18:55:39,644 - NataConsoleLog - INFO - WindowsError: [Error 32]

    关于这个问题,我看到似乎是 logging 的缺陷,在 log 量大的时候就会出现。
    求问万能的 V 友,有什么办法可以解决?

    pc10201
        1
    pc10201  
       Nov 13, 2015
    我也遇到过这种问题
    是用了 logging 的按大小自动分割就会出现这种情况
    我就把大小调大了一些
    billion
        2
    billion  
    OP
       Nov 13, 2015
    @pc10201 我是按时间分割的时候出现的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1058 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:15 · PVG 02:15 · LAX 11:15 · JFK 14:15
    ♥ Do have faith in what you're doing.