V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
ysymi
V2EX  ›  Python

请问各位大佬, gunicorn 的 logging 和 Python 程序的自己的 logging 有什么区别和联系?

  •  
  •   ysymi · Dec 29, 2017 · 3289 views
    This topic created in 3044 days ago, the information mentioned may be changed or developed.

    看到 gunicorn 的 settings 里有 accesslog 和 errorlog, 然后一个 python 程序也可以有自己的 logging,这两个 logging 会有冲突?

    目前自己猜测的是: 如果 python 程序自己的 log 写到标准输出,会被 gunicorn 捕获。如果 python 程序自己写到文件里,就不会被 gunicorn 捕获。

    请问老司机们,这两种 logging 是否是猜想的那样?或者说下自己的 logging 实践

    两个参考的文档:

    1. http://docs.jinkan.org/docs/flask/errorhandling.html
    2. http://docs.gunicorn.org/en/stable/settings.html#logging
    1 replies    2017-12-29 23:16:20 +08:00
    maemo
        1
    maemo  
       Dec 29, 2017
    可以看一下我发的帖子,里面有 gunicorn logging 的配置 https://www.v2ex.com/t/418542 ,可我的问题也没解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   959 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 23:15 · PVG 07:15 · LAX 16:15 · JFK 19:15
    ♥ Do have faith in what you're doing.