Logging7:16 with Kenneth Love
One of the first things programmers do when software starts misbehaving is to stick in `print()` calls. This is great if you don't mind extra output, but there's a better way to get diagnostic info back from your app!
- level - The level that you want to start logging messages at. Any message at this level or above will be logged.
- Logging Levels:
import logging try: [1, 2, 3].remove(4) except ValueError: logging.error("tried to remove an invalid value") print("Sorry, that value doesn't exist.")
You need to sign up for Treehouse in order to download course files.Sign up