Python Write Better Python Buggy Logs Log Messages

Shane Smith
Shane Smith
Python Development Techdegree Student 2,078 Points

Struggling to understand what this is asking me to do?

I dont understand what the question is asking of me.
import logging

logging.basicConfig(filename='cc.log', level=logging.DEBUG)

# Write your code below here

1 Answer

Rick Gleitz
Rick Gleitz
41,835 Points

Hi Shane,

It's asking you to log a message at the debug level, which will go into the file cc.log. You do this by literally typing:

logging.debug("and you put any string in here that you want")

And that's basically it!

It would help your understanding if you re-watch the previous video. Kenneth logs a more complicated string at about the five minute mark (he uses, though). But it's worth it to watch the whole video again.

Hope this helps!