To use Django, I need to log some counter-request in which the database writes.
I understand the DNS I would not like to write post-request database writing operations that keep the response time for the page. What is a simple design pattern for Django that lets me write a "lazy log", where I can use request hooks to gather information during processing, but any follow up operation and Does not the actual log writing process occur after the response to the user? I am currently using WSGI, but the most common solution is possible. The signal which has been removed after processing the reaction has expired, but is downwards , This will not allow you to access the existing But I think there are other options that you should consider: You can do some experiment to handle your logging tasks asynchronously, in addition there are also non-SQL databases, such as logging Provide easy and convenient features for you, e.g. The database can give you a big performance advantage. process_request () and
process_response () middleware hooks, but as far as I can tell, those hooks are in important ways ( Web page to respond)
request objects which is not quite useful for logging ... The latest location to hook into the DNS response processing is most probably in it. You can do this for example temporarily in the
request.session and type them in the database in the
close () method.
Comments
Post a Comment