如何关闭 BayeuxServer(嵌入 Jetty)中的 DBUG 级别日志记录?

发布于 2024-09-26 07:10:17 字数 419 浏览 2 评论 0原文

在 Jetty (7.1.5) 中运行 CometD Bayeux 实现时,大量 DBUG 级别的日志记录会输出到控制台。我已将记录器识别为 org.eclipse.jetty.util.log.StdErrLog 实例,但我不确定如何配置它。

我正在使用嵌入在另一个应用程序中的 Jetty,因此我尝试了 http://docs 中建议的内容。 codehaus.org/display/JETTY/Debugging(“嵌入 Jetty”部分),但没有成功。

目前我正在使用 |& 运行我的应用程序grep -v DBUG,但这相当烦人。有谁知道如何配置这种类型的记录器?

When running the CometD Bayeux implementation in Jetty (7.1.5), lots of DBUG level logging is output to the console. I've identified the logger as a org.eclipse.jetty.util.log.StdErrLog instance, but I'm not sure how to configure it.

I'm using Jetty embedded within another application, so I tried the things suggested at http://docs.codehaus.org/display/JETTY/Debugging ("With Jetty embedded" section), but had no success.

At the moment I'm running my app with |& grep -v DBUG, but that's fairly annoying. Does anyone know how to configure this type of logger?

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

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

发布评论

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

评论(1

眼眸 2024-10-03 07:10:17

终于找到了如何设置调试级别。在创建 CometdServlet 并将其添加到上下文中时,您可以将 ServletHolder 上的 logLevel 初始化参数设置为适当的级别(任何 3 或更大包括调试)。

ServletHolder comet = context.addServlet( CometdServlet.class, "/cometd/*" );
comet.setInitParameter( "logLevel", 2 );

Finally tracked down how to set the debug level. Where the CometdServlet is created and added to a context, you can set the logLevel init parameter on the ServletHolder to an appropriate level (anything 3 or greater includes debug).

ServletHolder comet = context.addServlet( CometdServlet.class, "/cometd/*" );
comet.setInitParameter( "logLevel", 2 );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文