Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Write Better Python Buggy Logs Logging

Logging general help

So...

logging is like taking notes on our code to help debug?

if we notice errors why wouldn't we try to fix them instead of just noting them? Guess I'm confused about what we're doing here. Thanks!

Hi Andrew, this seems to be something you would use for programs you write for other people, not for programs you write only for yourself. I've written a few python scripts to help my officemates with various tasks. I can see this feature being a useful way for me to monitor how the programs are running.

For example, several of this programs connect to APIs. I could use logging to keep track of how many connection issues there are or how close we're getting to hitting API call limits. Then, I could periodically review the logs to see how things are going.

I'm sure there is more to it.

1 Answer

Saikat Chowdhury
Saikat Chowdhury
3,128 Points

Hi Andrew, You are right in a sense. In generally coders/programmers update code if they found any problem in their application. Lets take an example , Windows Operating System. As you know in windows has so many components , process and lot of things running behind. If something went wrong it is tough to understand where is the fault or loop holes in code. In that time, coders ask for log file and try to understand what is the issue.

so, logging is an technique to find the reason of the error in applications.

Regards, Saikat