“HTTPI 尝试使用 httpi 适配器”使用 Savon SOAP 库时出错
我正在使用 Savon 编写 SOAP 服务的 Ruby 接口。 上出现了几条 DEBUG 消息
它似乎正在工作,但我在命令行D, [2011-02-15T16:33:32.664620 #4140] DEBUG -- : HTTPI 尝试使用 httpclient 适配器,但无法在 LOAD_PATH 中找到该库。回落 现在使用 net_http 适配器。
D, [2011-02-15T16:33:32.820863 #4140] DEBUG -- : HTTPI 使用 net_http 适配器执行 HTTP POST
我不确定为什么会出现这些消息,或者它们的含义是什么。
有什么想法吗?
I am using Savon to write a Ruby interface to a SOAP service. It appears to be working, but I am getting a couple of DEBUG messages appearing on the command line
D, [2011-02-15T16:33:32.664620 #4140] DEBUG -- : HTTPI tried to use the httpclient adapter, but was unable to find the library in the LOAD_PATH. Falling back
using the net_http adapter now.
D, [2011-02-15T16:33:32.820863 #4140] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
I am not sure why these messages are appearing, or what they even mean.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Savon 使用 HTTPI 执行 HTTP请求。 HTTPI 充当各种 Ruby HTTP 客户端库的适配器(当前支持:HTTPClient、Curb 和 Net/HTTP)。在 v0.9.0 之前,HTTPI 默认使用 HTTPClient,在无法加载库时记录警告并回退到使用 NetHTTP。
从 v0.9.0 开始,HTTPI 现在尝试加载 HTTPClient,然后加载 Curb,最后加载 NetHTTP,而不记录“后备警告”。
正如您所提到的,它仍然记录每个请求使用的适配器。 方式告诉 HTTPI 根本不记录任何内容:
您可以将应用程序的默认日志级别提高到类似 :info (HTTPI 日志位于 :debug),或者通过以下 请注意,禁用 v0.8.0 的日志记录是有问题的。 v0.9.0 已修复此问题。
Savon uses HTTPI to execute HTTP requests. HTTPI acts as an adapter to various Ruby HTTP client libraries (it currently supports: HTTPClient, Curb and Net/HTTP). Before v0.9.0, HTTPI's default was to use HTTPClient, log a warning when the library could not be loaded and fall back to use NetHTTP.
As of v0.9.0, HTTPI now tries to load HTTPClient, then Curb and finally NetHTTP without logging the "fallback warning".
Like you mentioned, it still logs the adapter used for each request. You could either raise the default log level of your app to something like :info (HTTPI logs at :debug) or tell HTTPI to not log anything at all via:
Ps. Please note that disabling the logging for v0.8.0 is buggy. This was fixed with v0.9.0.
啊啊,30 秒后我自己弄清楚了。只需安装 HTTPClient 适配器即可。
虽然我仍然收到以下 DEBUG 消息
D, [2011-02-15T16:33:32.820863 #4140] DEBUG -- : HTTPI 使用 net_http 适配器执行 HTTP POST
?
关于如何抑制它有什么想法吗
谢谢!
Aaaand, 30 second later I figure it out for myself. Just install the HTTPClient adapter.
Though I am still getting the following DEBUG message
D, [2011-02-15T16:33:32.820863 #4140] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter
Any ideas on how to suppress it?
Thanks!