Logging in FastAPI Apps / Writing a FastAPI Middleware

  Рет қаралды 14,868

Better Stack

Better Stack

Күн бұрын

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:
betterstack.com/community/gui...
Logging in Python: A Comparison of the Top 6 Libraries:
betterstack.com/community/gui...
► READ MORE
More about Better Stack: betterstack.com/
Community pages: betterstack.com/community/
► STAY TUNED
GitHub: 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

Пікірлер
Loguru - Simplified Python Logging with Loguru!
28:56
Better Stack
Рет қаралды 3 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 18 МЛН
Hot Ball ASMR #asmr #asmrsounds #satisfying #relaxing #satisfyingvideo
00:19
Oddly Satisfying
Рет қаралды 49 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 4,9 МЛН
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
4 Tips for Building a Production-Ready FastAPI Backend
27:02
ArjanCodes
Рет қаралды 50 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 148 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 18 МЛН