JSON logs in Python apps - with FastAPI & python-json-logger!

Better Stack
Better Stack
2.2 هزار بار بازدید - 6 ماه پیش - In this video, we'll look
In this video, we'll look at how to output logs in JSON format from Python applications. We will demonstrate this with the "python-json-logger" package, and will also show how to centralize our logs by sending them to Better Stack from our application code. ► RELATED GUIDES 10 Best Practices for Logging in Python: betterstack.com/community/guides/logging/python/py… Logging in Python: A Comparison of the Top 6 Libraries: betterstack.com/community/guides/logging/best-pyth… How to Get Started with Logging in Django: betterstack.com/community/guides/logging/how-to-st… ► HACKING SCALE NEWSLETTER newsletter.betterstack.com/ ► READ MORE More about Better Stack: betterstack.com/ Community pages: betterstack.com/community/ ► STAY TUNED GitHub: github.com/BetterStackHQ Twitter: twitter.com/betterstackhq LinkedIn: www.linkedin.com/company/betterstack Instagram: www.instagram.com/betterstackhq/ TikTok: www.tiktok.com/@betterstack 📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀: 00:00 Intro 00:47 python-json-logger intro 01:16 Starter Project 02:39 Creating python environment 03:49 Creating FastAPI handler 09:27 Outputting logs in JSON format with python-json-logger 11:29 Sending Python logs to Better Stack 15:44 Creating FastAPI handler with a path parameter #logging #python #pythonprogramming
6 ماه پیش در تاریخ 1403/01/09 منتشر شده است.
2,254 بـار بازدید شده
... بیشتر