python logging usage
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
查看更多关于python logging usage的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did44316