1234567891011121314151617 |
- # import logging
- #
- # logger = logging.getLogger(__name__)
- # logger.setLevel(level = logging.INFO)
- # handler = logging.FileHandler("logs/creditReport.txt")
- # handler.setLevel(logging.INFO)
- # formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
- # handler.setFormatter(formatter)
- # logger.addHandler(handler)
- import logging
- from mpFileLog import MPFileLogHandler
- logger_handler = MPFileLogHandler('logs/creditReport.txt')
- logger = logging.getLogger('info')
- formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
- logger_handler.setFormatter(formatter)
- logger.addHandler(logger_handler)
- logger.setLevel(logging.ERROR)
|