Project 19: Profile Settings Card
Python Challenge
Builds on these lessons
Step 1 of 3
Project
Logging Instead of print
Set up logging.basicConfig(level=logging.INFO) and replace a print with logger.info(...). Unlike print, logging carries a severity level, a timestamp, and can be redirected to a file or log aggregator in production — none of which a bare print statement gives you.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def update_profile(user_id, changes):
logger.info(f"Updating profile for user {user_id}: {changes}")
update_profile(42, {"theme": "dark"})