Last active
December 5, 2018 01:37
-
-
Save idaWHALE/2828db4909d67bc7c43e949b238587bd 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 | |
logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] %(processName)s:%(threadName)-12s %(name)s:%(lineno)-7d (%(asctime)s) %(message)s', ) | |
logger = logging.getLogger('MdnMonReport') | |
def test(): | |
try: | |
print('holder') | |
raise Exception('We got an exception') | |
except Exception as e: | |
logger.exception('Exception in test') | |
logger.info('info') | |
logger.error('error') | |
logger.debug('Done testing exception logging') | |
test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment