Last active
December 19, 2018 07:49
-
-
Save foowaa/4363b9e4420a431ca0a3a846646ad70f to your computer and use it in GitHub Desktop.
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
# Level: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET | |
import logging | |
logging.basicConfig(level=logging.DEBUG, | |
filename="mylog.log", | |
format='%(asctime)s %(levelname)s %(filename)s %(funcName)s %(lineno)d %(message)s', | |
filemode='w') | |
logger = logging.getLogger(__name__) | |
# logging.getLogger("module_name").setLevel(logging.CRITICAL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment