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 Python Decorators

Kiefer H
Kiefer H
5,665 Points

Should we always use a logging func when building projects?

Seems like something we should do? I have gotten into the habit of always leaving Docstrings (mostly for myself) but never any sort of Logging with Decorators like we are doing here nor any Tests!

But after seeing the Logging and Testing sections, it seems like something we would always want to do? Always assert that our funcs are working properly and always logging them?

Jeff Muday
Jeff Muday
Treehouse Moderator 28,716 Points

Awesome practice!

Most people omit logging for the sake of brevity in their code. Also, the format of the logging would vary widely on what logging is attempting to accomplish. Sometimes logging can be too verbose (rarely) or not verbose enough. It's up to the code designer and client as to what a project needs.