inflearn logo
inflearn logo

Everything You Need to Know About Python Logging with Loguru

Stop using print()! Learn easy and powerful logging with the Python Loguru library. From basic concepts to file management, FastAPI web app integration, and Slack notifications, we will guide you step-by-step through hands-on practice.

(5.0) 2 reviews

35 learners

Level Basic

Course period Unlimited

Python
Python
python-logging
python-logging
loguru
loguru
trace-logging
trace-logging
Python
Python
python-logging
python-logging
loguru
loguru
trace-logging
trace-logging

What you will gain after the course

  • How to log easily and quickly by mastering the core features of the Loguru library

  • Practical techniques for automatically managing (rotating, preserving, and compressing) log files

  • Know-how for building a production-level logging system in FastAPI web applications

  • How to implement a system that integrates with Slack to receive real-time error notifications

  • A technique for effectively analyzing log data by generating logs structured in JSON format.

🙋‍♂️ Course Introduction

Everyone, are you still only using print() for debugging? 😱 As your code gets more complex, I'm sure you've all experienced the pain of messy print() statements cluttering up your terminal.

This course is an introductory lecture on 'Python Enjoyable Logging (python-logging)' for people just like you! No more complex and headache-inducing configurations! 🙅‍♀️ Let's learn loguru together, the world's easiest Python logging library that starts with just a single line of code.

It's not just about printing logs. 🚀 From adding beautiful colors to your terminal and managing log files intelligently, to ultimately building a professional-level logging system (trace-logging) in a real web application (FastAPI) and sending real-time error notifications—I will guide you through the entire process step-by-step with a hands-on, practice-oriented approach.

Are you ready to end the era of print() and take your development skills to the next level? ✨, bạn đã sẵn sàng để nâng cấp kỹ năng lập trình của mình lên một tầm cao mới chưa? ✨


💡 Course Features

  • 🎬 Practice-oriented curriculum: This is not a theory-only lecture you just watch. In each chapter, you will type the code yourself and naturally master all the features of loguru.

  • 📈 From Absolute Beginners to Intermediates: We start with easy conceptual explanations so that anyone who knows basic Python syntax can follow along. However, the final result is a production-level logging system that can be applied directly to real-world tasks.

  • 🤖 Practical Final Project: Just learning how to use a library and calling it a day? No! We will apply loguru to FastAPI, the hottest web framework right now, to build your own web application logging system from start to finish.

  • 🎉 'Trial and Error' Prevention Full Package: From development environment setup to final deployment scenarios! We meticulously cover everything from A to Z to help you avoid all the trial and error you might encounter.

Recommended for these people

print() Python beginners dreaming of an escape 🐣

If you've been struggling with cluttered code and missing important information because you relied too much on print() to see how your code runs, this is for you!
Now, use loguru to check only the information you need in a clean and organized way.

A junior developer facing their first company and first project 👨‍💻

"How do they handle logging in the real world?" Have you felt lost? With this single course, you can perfectly prepare everything from file management and JSON structured logging to real-time error notifications that you can apply directly to your work.

Developers who want to give wings to their side projects 🚀
Just because it's a solo project doesn't mean you can leave logs haphazardly! For those who want to increase stability and track user movements more easily by introducing a systematic logging system to their precious services built with FastAPI.

Here's what you'll learn!

  1. Mastering Loguru's Core Features👑 Learn the magical features of loguru that allow you to save logs to files, change formats, and automatically manage old files (rotation, retention, compression) with just a single function, logger.add(). You'll never have to stay up all night managing log files again!

  2. Elegant Exception Handling and Debugging 🛠️ No more code cluttered with try-except! We'll teach you powerful debugging secrets: how to automatically catch errors with a single line using the @logger.catch decorator, and how to identify which variable caused the problem at a glance with the diagnose=True option. (Security warnings are a must! 😉)

  3. FastAPI Hands-on Project: Building Your Own Logging System 🏗️ We will apply all the knowledge learned so far to build a production-level logging system for a FastAPI web application. You can gain practical experience by separating configurations for development and production environments and creating middleware that automatically tracks all requests and responses.

  4. External Service Integration: Receive Real-time Error Notifications via Slack 🔔 What if a critical error occurs in your service? You need to know immediately, even while you're asleep! We will implement an automated system that integrates loguru with Slack to send real-time error notifications to a designated channel. Now you can sleep soundly! 😴


Notes before taking the course

Practice Environment

  • The lecture is explained based on MacOS.

Prerequisites and Important Notes

  • Basic Python syntax


Recommended for
these people

Who is this course right for?

  • Python beginners who feel the limitations of debugging using only the print() function

  • A junior developer who wants to build a systematic logging system

  • Those who want to learn practical logging methods while developing web applications with FastAPI

  • A data engineer who wants to efficiently manage and analyze log data

  • All Python developers who felt the existing logging module was complex and difficult.

Need to know before starting?

  • Understanding of basic Python syntax

Hello
This is haeyeomiso

Nice to meet you!

I am Haeyeo, someone who explores the infinite possibilities of AI and computer science and wishes to share that journey with all of you.

During my undergraduate years, my passion for my major was so intense that I was nicknamed a 'Computer Science Addict.' I graduated at the top of my class with a major GPA of over 4.4. I then earned my Master's degree in AI from Seoul National University and further deepened my expertise through a doctoral program.

However, as I felt as much of a fascination for solving real-world problems with AI as I did for theoretical exploration, I took a break from my doctoral studies to gain valuable hands-on experience by working on AI-based LLM and video analysis projects at a startup.

Currently, I am working as an LLM project developer and PM at one of the top three conglomerates in Korea, contributing to creating positive changes that AI technology will bring to our lives. I will generously share with you the challenges I faced, the problem-solving processes I went through, and the vivid know-how I gained in the field. I will be your reliable guide on this journey into the exciting world of AI.

Inquiries and Proposals: haeyeo.open@gmail.com

More

Reviews

All

2 reviews

5.0

2 reviews

  • abcd123123님의 프로필 이미지
    abcd123123

    Reviews 329

    Average Rating 5.0

    5

    16% enrolled

    • tiaz0128님의 프로필 이미지
      tiaz0128

      Reviews 9

      Average Rating 5.0

      5

      42% enrolled

      You have excellent delivery skills and the content structure is solid. It's great that I can quickly learn just the core material. This might vary depending on personal preference, but since you often explain things using only Notion, I think it would have been even better if you had demonstrated by actually running code while explaining! I'll have to purchase and watch other courses too! Thank you.

      haeyeomiso's other courses

      Check out other courses by the instructor!

      Similar courses

      Explore other courses in the same field!

      Access is restricted to non-public courses.