Your question, your audience. Choose who sees your identity—and your question—with question security.
import logging, mymodule logging.basicConfig() log = logging.getLogger("MyApp") log.setLevel(logging.DEBUG) #set verbosity to show all messages of severity >= DEBUG log.info("Starting my app") try: mymodule.doIt() except Exception, e: log.exception("There was a problem.") log.info("Ending my app")
Join the community of 500,000 technology professionals and ask your questions.