开发者

Best practices for logging in django project

开发者 https://www.devze.com 2022-12-22 09:32 出处:网络
It is always good to utilize existing patterns for solving the given problem rather then reinventing the wheel. This time it is about doing logging stuffs in django based project.

It is always good to utilize existing patterns for solving the given problem rather then reinventing the wheel. This time it is about doing logging stuffs in django based project.

Can you please share your ideas with me and other about how do you prefer to implement logging in django based project in the following context?

  • What factors would you consider before starting design of logging system?开发者_如何学C
  • What would you like to log in a project? (messages, errors, request etc)?
  • How would you like to log?
  • What should be directory structure?
  • In what format would you like to log?
  • Which django apps do you use?
  • Have you make any such reusable apps? if yes, can you share with other?
  • Or any other idea which you find useful to share with other.

... Any little help would be really good for all django developers ...

cheers


In Django, like in any other Python application, I'd use the standard library's logging module and call logging.debug, logging.info etc as appropriate to each message.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号