4

I want to log every request sent to Django.

There are some posts online about logging middleware. The Django documentation talks about logger configuration and it seems that I can set it up to log everything without writing middleware.

  • Can I log everything without middleware?
  • What can middleware give me that a well-tuned Django logging config cannot?
  • Can I log INFO level messages, with DEBUG = False and no middleware?
  • How much extra load does logging everything add to my app?
power
  • 1,680
  • 3
  • 18
  • 30

1 Answers1

3

if want to log every request, in that case, you should use Logging in middleware https://djangosnippets.org/snippets/428/

Jamil Noyda
  • 3,321
  • 2
  • 21
  • 26