Logging in FastAPI Apps / Writing a FastAPI Middleware
About
No channel description available.
Latest Posts
Video Description
This video will demonstrate a logging setup for the FastAPI web framework in Python. It will cover basic config using Python's logging package, centralization of logs to Better Stack, and will show how you can write a middleware in FastAPI to log request/response information. โบ 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 01:30 Creating FastAPI App 04:01 Adding logging to FastAPI 10:11 Adding Better Stack log handler 14:23 Log middleware in FastAPI 25:21 Calculating response processing time #fastapi #logging #python #pythonprogramming
Smart Home Starter Kit Essentials
AI-recommended products based on this video

Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter

Amazon Basics Emergency Seat Belt Cutter and Window Hammer Tool, Car Accessories, 2 Pack

Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

Wyze Cam v3 with Color Night Vision, Wired 1080p HD Indoor/Outdoor Security Camera, 2-Way Audio, Works with Alexa, Google Assistant, and IFTTT, 2-Pack

WYZE Cam v4, 2.5K HD WiFi Smart Home Security Camera, Indoor/Outdoor, Pet/Baby Monitor, Motion Activated Spotlight/Siren, Color Night Vision, 2-Way Audio, Works with Alexa & Google, Wired, Grey

Kasa Smart Outdoor Smart Plug by TP-Link (KP400) - Smart WiFi Outlet with 2 Sockets, IP64 Waterproof, Works with Alexa and Google Home, 2.4GHz WiFi Required, No Hub Required, Sunset & Sunrise Offset

Philips Hue Bridge - Unlock the Full Potential of Hue - Multi-Room and Out-of-Home Control - Create Automations and Zones - Secure, Stable Connection Won't Strain Your Wi-Fi - Works with Voice, Matter

NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)




















