Created
October 9, 2018 08:56
-
-
Save setomits/dda1b9fa6b58b1cd0a0fa274c2aea161 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
import logging | |
logger = logging.getLogger('xxx') | |
for lvl in (logging.DEBUG, logging.INFO, | |
logging.WARNING, logging.ERROR, logging.CRITICAL): | |
logger.setLevel(lvl) | |
print(logger.level) | |
logger.debug('debug') | |
logger.info('info') | |
logger.warning('warning') | |
logger.error('error') | |
logger.critical('critical') | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment