t_logging.py 360 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/8 14:01
  6. @File :t_logging.py
  7. '''
  8. import logging
  9. import logging.config
  10. logging.config.fileConfig("logger.conf")
  11. logger = logging.getLogger("example01")
  12. logger.debug('This is debug message')
  13. logger.info('This is info message')
  14. logger.warning('This is warning message')