import logging logging.warning("Here is a variable: %s", my_var)