Answer the question
In order to leave comments, you need to log in
How to implement log logging in Django?
Actually, here's the thing, I want to make a table that will store the user's IP
, URL, HTTP response code.
Intersuet how to call the creation of a new object, well, the actual model, which is necessary for storage.
Thank you.
Answer the question
In order to leave comments, you need to log in
You don't have to do that!
check out https://docs.python.org/2/library/logging.html
As for me, it’s better to create a decorator in which each request will be written to the database and it can be used only for the necessary views, and if you need to write a log of all requests in the project, then it’s better through middleware
User IP, URL, HTTP response code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question