V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
1980744819
V2EX  ›  Python

有什么好用的支持异步的 log 库推荐吗

  •  
  •   1980744819 · 2020-09-21 14:53:54 +08:00 · 2404 次点击
    这是一个创建于 1285 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,希望能用协程异步写 log 日志,进一步提升服务端性能

    4 条回复    2020-09-22 10:08:36 +08:00
    al0ne
        1
    al0ne  
       2020-09-21 15:21:26 +08:00
    loguru
    1980744819
        2
    1980744819  
    OP
       2020-09-21 19:11:30 +08:00
    @al0ne 谢谢
    18870715400
        3
    18870715400  
       2020-09-21 22:01:51 +08:00
    python 自带的 logging 是多线程安全的, https://www.jianshu.com/p/654da175f2c3 , 参考第二段代码.
    1980744819
        4
    1980744819  
    OP
       2020-09-22 10:08:36 +08:00
    @18870715400 我需要的是支持协程的,不太想要用多线程来记录 log
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2449 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:53 · PVG 23:53 · LAX 08:53 · JFK 11:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.