Apache commons httpclient - 禁用调试/降低调试级别

发布于 2024-07-06 20:19:56 字数 278 浏览 6 评论 0原文

我在 Lotus Notes Java 代理中使用 apache commons httpclient,它工作正常。 但是,当建立代理连接时,日志将通过以下行发送垃圾邮件:

[INFO] AuthChallengeProcessor - basic authentication scheme selected

您知道如何禁用集成日志记录或如何设置较低的调试级别吗? 它是 httpclient 本身的“功能”,因此不需要我这边的代码:-)

谢谢。

i am using the apache commons httpclient in a lotus notes java agent and it works fine. BUT when establishing a proxy connection the log will be spamed with the following line :

[INFO] AuthChallengeProcessor - basic authentication scheme selected

Do you know how to disable the integrated loging or how to set a lower debug level ?
Its a "feature" from the httpclient itself, so code from my side is not needed :-)

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

此岸叶落 2024-07-13 20:19:56

您应该能够将日志记录级别设置为垃圾邮件较少的级别。 有一些默认的日志记录选项,所以这取决于日志记录您选择的方法。

听起来您的日志记录级别设置为“调试”或“信息”,应设置为“通知”或更高(以避免信息和低于级别的警告)

you should be able to set the logging level to something less spammy. there are a few default logging options, so it depends on the logging method you chose.

it sounds like your logging level is set to "debug" or "info" and should be set at "notice" or above (to avoid info and below level warnings)

驱逐舰岛风号 2024-07-13 20:19:56

我查看了身份验证 RFC,并读到这是一个不要使用基本身份验证的警告。 所以我认为我需要更改身份验证以不以可读文本提交登录信息。

i have had a look into a authentification rfc and read that this is a warning not to use basic authentification. so i think i need to change the authentification to not submit the login information in readable text.

酒废 2024-07-13 20:19:56

可以设置 AuthPolicy 优先级:

... snipp....

client.getState().setProxyCredentials(
                            new AuthScope(conParm.getProxyServer(), conParm.getProxyPort()),
                            new UsernamePasswordCredentials(conParm.getProxyUser(), conParm.getProxyPw()));

    **ArrayList authPrefs = new ArrayList(2);
    authPrefs.add(AuthPolicy.DIGEST);
    authPrefs.add(AuthPolicy.BASIC);

                        client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
                        client.getParams().setParameter("http.protocol.expect-continue", new Boolean(true));**

..snapp....

It is possible to set a AuthPolicy Priority :

... snipp....

client.getState().setProxyCredentials(
                            new AuthScope(conParm.getProxyServer(), conParm.getProxyPort()),
                            new UsernamePasswordCredentials(conParm.getProxyUser(), conParm.getProxyPw()));

    **ArrayList authPrefs = new ArrayList(2);
    authPrefs.add(AuthPolicy.DIGEST);
    authPrefs.add(AuthPolicy.BASIC);

                        client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
                        client.getParams().setParameter("http.protocol.expect-continue", new Boolean(true));**

..snapp....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文