0

I have set up a Python Django projects. I have made a number of web services. But sometimes the data being logged is somewhat large and it takes like 3-4 seconds to log due to which response of service is delayed for few seconds which is a big factor in terms of performance.

Question: I was just wondering how can I make logging kind of asynchronous? Does Django provide like an option for this? OR do I have to take some other approach and handle it myself like open another thread and do logging in it?

1 Answer 1

1

You can use QueueHandler amd QueueListener which are available for Python 2.x through the logutils package. This post has more details, as do the relevant Python 3.x docs.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.