Python Tutorial: Logging Basics - Logging to Files, Setting Levels, and Formatting

preview_player
Показать описание
In this Python Tutorial, we will be going over the basics of logging. We will learn how to switch out our print statements for logs, change the logging level, add logs to files, and also how to change the format of those logs. Let's get started.

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Python
Рекомендации по теме
Комментарии
Автор

Quite Possibly the best python teacher on the internet

kevinl
Автор

Other tutorials made me scared of Python logging, I didn't realize it could be this simple.
Being a good coder and being a good teacher are 2 different things. You sir are both. Thank you and God bless.

kerwinso
Автор

Thanks a lot Corey, you truly are a great teacher and definitely my favorite python YouTube channel!

geoffgivry
Автор

I come back to your videos every time I need a refresher. In many ways, they have taught me more about Python and programming than several very expensive textbooks. Thank you so much, Mr. Schafer!

JamBear
Автор

You have by far the best python tutorials on YouTube!! Clear, concise, and easy to understand.

jpchado
Автор

You know Corey, it's a gift to be such a good teacher. You should be the reference to Python teaching.

ibrahimal-mahfooz
Автор

Thanks Corey, you make great, concise and clear tutorials.. Would you do one on Multithreading and Multiprocessing sometime?

matthew.s
Автор

It's amazing that you're able to cover all the essential points of the topic in less than 15 minutes. Thank you.

reyhang
Автор

My first video lecture for logging in Python, and everything you explained is smooth and clear. Thanks!

bhaskarbhuyan
Автор

Perfect videos, best teacher. This guy is a very cut to the chase type of teacher. Other click bait video teachers spend the first half of the videos explaining how birds mate in the wild before getting to the actual code. I love this teacher.

Samuel-ikwp
Автор

This is excellent! He says everything that is needed, speaks clearly, and keeps an efficient pace.

viktorpaulsen
Автор

I believe if a human with basic English & Computer knowledge listen to your videos, they can learn Python or whatever you teach Corey!! Your talent is a Gift to you and you are a treasure to us!! Keep going, we support you always!

kvenugopal
Автор

Man, I wish I found your channel a year ago. I started learning Python last year and I had so much difficulty debugging the game I was making. What luck that I'm starting a new project and I just found your channel!

LiamTolentino
Автор

You are a great Corey! I always recommend your videos to anyone who want to learn Python. You are my favorite teacher. Please keep making these videos. Love from India.

satyasashi
Автор

Your tutorials are so clear and easy to understand, that tells me you know what you're teaching not like others putting the cart before the horse. Thank you

MTT
Автор

Fantastic tutorial - I've been meaning to implement logging into quite a large project, and these logging videos have helped me astronomically. Thank you!

chaddrobertson
Автор

Great intro to logging. Clear, direct, straightforward.

thebuggser
Автор

Corey, you're the gold standard for training !

danielmadar
Автор

No joke, thank you for using really simple functions "add", "subtract", etc. It makes it easier for us newbies!

Ryan-djku
Автор

For ppl on Python 3.9 or later:

The log file only works (at least for me) if you pass an additional argument to logging.basicConfig().
It has to be logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG).

Sinthora