Created
March 21, 2015 22:19
-
-
Save vse/e6ab02db5c7f346d9d07 to your computer and use it in GitHub Desktop.
log to a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig(level=logging.DEBUG, filename='/tmp/test.log') | |
log = logging.getLogger() | |
log.info("info") | |
log.debug("debug") | |
log.error("error") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment