Logging in FastAPI Apps / Writing a FastAPI Middleware

Publié le: 11 décembre 2023
sur la chaîne: Better Stack
21,783
612

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/gui...

Logging in Python: A Comparison of the Top 6 Libraries:
https://betterstack.com/community/gui...

► 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:   / betterstackhq  
LinkedIn:   / betterstack  
Instagram:   / betterstackhq  
TikTok:   / 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Logging in FastAPI Apps / Writing a FastAPI Middleware durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Better Stack 11 décembre 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 21,783 fois et il a aimé 612 téléspectateurs. Bon visionnage!