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 trialSahar Nasiri
7,454 PointsWhat is different
logging.basicConfig(...., level = DEBUG) logging.debug() The file is saving on debug level why do we need to save a debug message?
1 Answer
Afrid Mondal
6,255 PointsHey Sahar, the logging functions are named after the level or severity of the events they are used to track. They are debug,info,warning..... So, among that DEBUG is used to find out the detailed information, typically of interest only when diagnosing problems.
Sahar Nasiri
7,454 PointsSahar Nasiri
7,454 PointsHey Afrid, :) Thanks.
What would be different if I saved my file on another level? and how can I understand the level of a log text or a log file?
Afrid Mondal
6,255 PointsAfrid Mondal
6,255 PointsLogging provides a set of convenience functions for simple logging usage. These are debug(), info(), warning(), error() and critical(). Always use Python Doc it is a really great place to grasp every details. https://docs.python.org/2/howto/logging.html