推荐学习书目
› 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 · 2929 views
    This topic created in 3441 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
        1
    111111111111  
       Apr 24, 2017 via Android   ❤️ 1
    自定义信号,可以处理 views
    没试过 logging 日志入库
    n37r06u3
        2
    n37r06u3  
       Apr 24, 2017 via iPhone   ❤️ 1
    光是 log 也看不到具体的操作记录吧
    awanabe
        3
    awanabe  
       Apr 24, 2017
    格式化一个对象,异步丢到 celery 里面去入库吧。
    irory
        4
    irory  
       Apr 24, 2017
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2448 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 01:02 · PVG 09:02 · LAX 18:02 · JFK 21:02
    ♥ Do have faith in what you're doing.