浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
when you use some third part library,you want to print out these libraries debug info may help you dailogous,code as follows:

import logging
from urllib3.connectionpool import log
console = logging.StreamHandler()

console.setLevel(logging.INFO)

formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s")

console.setFormatter(formatter)

log.addHandler(console)

reference:http://blog.sina.com.cn/s/blog_51294ca50100gc3x.html

posted on 2010-06-02 13:56  lexus  阅读(240)  评论(0编辑  收藏  举报