Formatting the message manually before passing it to a logging
call does unnecessary work if logging in disabled. Consider using the logging
module's built-in formatting features to avoid that.
import logging, inspect
logging.basicConfig(level=logging.INFO)
logging.debug("Entered function {}".format(inspect.stack[0][3]))
import logging, inspect
logging.basicConfig(level=logging.INFO)
logging.debug("Entered function %s", inspect.stack[0][3])