Skip to main content

Logging

import logging
logging.basicConfig(level=logging.INFO)

logging.info("hello") # info about the normal script behavior
logging.debug("hi") # very detailed output for diagnostic purposes
logging.warning("caution") # warning for something the dev can do something about
logging.error("something went wrong") # handle error without raising exception- eg. in a long-runnning server process

## Links