MENU

Fun & Interesting

Python QueueHandler & QueueListener - Offload Log Processing to Separate Thread | FastAPI demo

Better Stack 3,343 1 year ago
Video Not Working? Fix It Now

Python's QueueHandler and QueueListener objects allow you to offload log processing to a separate thread - which can be beneficial for performance. We'll explore these tools in this video, and how they can improve performance when using Python's SMTPHandler. We'll show a quick demo of how to use the QueueHandler in a FastAPI application. ► RELATED GUIDES 10 Best Practices for Logging in Python: https://betterstack.com/community/guides/logging/python/python-logging-best-practices/ Logging in Python: A Comparison of the Top 6 Libraries: https://betterstack.com/community/guides/logging/best-python-logging-libraries/ ► HACKING SCALE NEWSLETTER https://newsletter.betterstack.com/ ► READ MORE More about Better Stack: https://betterstack.com/ Community pages: https://betterstack.com/community/ ► STAY TUNED GitHub: https://github.com/BetterStackHQ Twitter: https://twitter.com/betterstackhq LinkedIn: https://www.linkedin.com/company/betterstack Instagram: https://www.instagram.com/betterstackhq/ TikTok: https://www.tiktok.com/@betterstack 📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀: 00:00 Intro and Setup 02:31 Setting up SMTPHandler 08:35 Offloading log processing to separate thread with QueueHandler & QueueListener 13:19 FastAPI app demonstration #fastapi #logging #python #pythonprogramming

Comment