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

Django 下怎么做日志审查

  •  
  •   linkbg · Apr 24, 2017 · 3013 views
    This topic created in 3484 days ago, the information mentioned may be changed or developed.

    现有的系统下,要增加一个日志审计。

    现有的环境: Django+Mongodb 。

    然后想直接用 logging 来处理日志,但是怎么入库呢?

    看到网上也有人讨论 signals 来处理,这个块不是很熟,想问一下,只处理 views 可以吗,因为现有的环境没有 models 的处理。 谢谢

    4 replies  •  2017-04-24 15:10:35 +08:00
    111111111111
    111111111111
    Apr 24, 2017 via Android❤️1
    1
    自定义信号,可以处理 views
    没试过 logging 日志入库
    n37r06u3
    n37r06u3
    Apr 24, 2017 via iPhone❤️1
    2
    光是 log 也看不到具体的操作记录吧
    awanabe
    awanabe
    Apr 24, 2017
    3
    格式化一个对象,异步丢到 celery 里面去入库吧。
    irory
    irory
    Apr 24, 2017
    4
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1884 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:08 · PVG 17:08 · LAX 01:08 · JFK 04:08
    ♥ Do have faith in what you're doing.