推荐学习书目
› 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
GjriFeu
V2EX  ›  Python

Python logging 模块

  •  
  •   GjriFeu · Oct 11, 2017 · 2017 views
    This topic created in 3273 days ago, the information mentioned may be changed or developed.
    • 想在一个程序中使用多个 logger (一个是根 logger ),先设置了根 logger 的属性,然后子模块中设置了一个 logger ; 但是发现有一个问题是子 logger 写的日志也会写到根 logging 的文件中。

    有没有什么方法设置子模块的 logger 写的日志 不会写到根 logger 的文件中,请教各位大佬

    2 replies  •  2017-10-11 16:37:20 +08:00
    knightdf
        1
    knightdf  
       Oct 11, 2017   ❤️ 1
    set propagate = False
    GjriFeu
        2
    GjriFeu  
    OP
       Oct 11, 2017
    @knightdf 感激不尽
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   928 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 18:29 · PVG 02:29 · LAX 11:29 · JFK 14:29
    ♥ Do have faith in what you're doing.