Python Write Better Python Buggy Logs Log Messages

how to Log a message with a level of DEBUG?

how do we log a message with a level of Debug?

starter.py
import logging

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

# Write your code below here

1 Answer

Josh Keenan
Josh Keenan
19,393 Points

It is very similar to the example in the video,

logging.info("Request successful")

This line here would log the string "Request successful" to the INFO logging level, you need to use debug in the challenge. The syntax is the same, you got this!