请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

为什么ctx.log.warn没有输出呢?

from mitmproxy import ctx
def request(flow):
    ctx.log.warn(str(flow.request.url))
    ctx.log.warn(str(flow.response.status_code))
    ctx.log.warn(str(flow.request.method))
    print(flow.request.headers)

老师看一下是哪里写错了吗?
最后一行print是有输出的

正在回答 回答被采纳积分+3

1回答

大壮老师 2020-10-11 16:47:38
from mitmproxy import ctx
def request(flow):
	ctx.log.warn(flow.request.url)
	ctx.log.error(flow.request.url)
	ctx.log.info(flow.request.url)

https://img1.sycdn.imooc.com//szimg/5f82c6a609a08e6513420575.jpg

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信