开发者

track def excute in django

开发者 https://www.devze.com 2023-02-22 23:35 出处:网络
I want by default see all def run without any customizing code example [date] settings.py [date] url.py [date] /apps/views/views.py run index def

I want by default see all def run without any customizing code

example

[date] settings.py
[date] url.py
[date] /apps/views/views.py run index def 
[dat开发者_如何学运维e] ...

is there any middle were or something do this job?


This is a tough one. First of all, logging every function (proper term for “def”) would probably a bad idea and unnecessary. You might want to look at the python trace module.

If you are just trying to debug what's happening in a Django app and want to do so with a middleware, look no further than the awesome django-debug-toolbar.

If you want to log Django activity (which is probably what you are asking for), the django-logging-middleware is perfect for this case.

0

精彩评论

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

关注公众号