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

Показать описание
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:
Logging in Python: A Comparison of the Top 6 Libraries:
► HACKING SCALE NEWSLETTER
► READ MORE
► STAY TUNED
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
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
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:
Logging in Python: A Comparison of the Top 6 Libraries:
► HACKING SCALE NEWSLETTER
► READ MORE
► STAY TUNED
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
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