Loguru - Simplified Python Logging with Loguru!

Loguru - Simplified Python Logging with Loguru!

11.706 Lượt nghe
Loguru - Simplified Python Logging with Loguru!
In this video, we'll explore the loguru package for logging in Python - this is the most popular third-party package for logging in the Python ecosystem. We'll explore log-levels, handlers, formatting and log rotation/retention in this video, and will see how to include contextual data and exception data in our log records using Loguru. We'll also explore log centralization with Better Stack, and how to centralize the log records generated by Loguru. ► RELATED GUIDES A Complete Guide to Logging in Python with Loguru https://betterstack.com/community/guides/logging/loguru/ 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 00:36 Loguru installation & intro 03:43 Formatting Log Entries with Loguru 07:51 Outputting JSON logs with loguru 09:55 Setting Log Level for loguru sinks 12:24 Outputting custom contextual data with Loguru 15:44 Logging exceptions with loguru 19:58 Log Rotation and Retention in loguru 23:19 Log Centralisation with Better Stack #logging #python