首页 » Posts tagged with "logging模块"
果子MM (46)

python 用logging模块输出日志

Date:2013-06-17Author:felix.chanCategory:python编程Comment:0

代码如下: #!/usr/bin/env python   import logging import sys   logfile = 't.log'   logger = logging.getLogger() file_handler = logging.FileHandler(logfile) stream_handler = logging.StreamHandler&...

Continue