Python 实现日志同时输出到屏幕和文件
1. 日志输出到屏幕 #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging logging.basicConfig(level=logging.NOTSET, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.debug
用户评论