我正在尝试禁用Python2.6.6中的调试日志记录,它在运行某些命令时似乎会触发。。。我尝试了似乎所有的解决方案,但仍然得到了不想要的结果
我甚至包括:
logging.disable(logging.CRITICAL)
同样的结果
当我通过cmd提示符运行相同的命令(test.cmd)时,我得到了预期的输出。当我通过python脚本运行同一命令时,使用以下代码:
p = Popen([test, "report"], stdin=PIPE, stdout=PIPE, stderr=STDOUT)
output = p.stdout.read()
print output
我得到了以下信息(而且还在继续):
07/06/18 08:13:16 DEBUG : Enter: HTTPSender::invoke
Enter: HTTPSender::invoke
07/06/18 08:13:16 DEBUG : XML sent:
XML sent:
07/06/18 08:13:16 DEBUG : ---------------------------------------------------
---------------------------------------------------
07/06/18 08:13:16 DEBUG : POST /awstestservice/soap HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "awstestReport"
Content-Length: 327
有什么想法吗
我最后写了以下解决方法:
不知道这是否有帮助,但它解决了我的问题
相关问题 更多 >
编程相关推荐