Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 27,918 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.