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

Log "The French have the Grail"

import logging

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

# Write your code below here
logging.debug("Hi")
logging.warning("The French have the Grail")

what is wrong with this code?

[Edited formatting -cf]

I'm running into the same problem, and I've also tried code that's slightly different:

import logging

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

# Write your code below here
logger = logging.getLogget(__name__)
logger.debug("Hello")
logger.warning("The French have the Grail")
Chris Freeman
Chris Freeman
Treehouse Moderator 68,468 Points

Nick Douma: You have a typo:

logger = logging.getLogger(__name__) #<-- rename getLogget to getLogger

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Hey, thanks for posting this. Just checked the code challenge and it's buggy. I'm working on fixing it now.

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Alright, everything seems to be working now.

Your code passes for me, Sayan De

Thanks Sir