是否可以在 JBoss 5.1 中禁用打印到控制台的跟踪?

发布于 2024-08-24 04:09:35 字数 306 浏览 2 评论 0原文

默认情况下,JBoss5.1中有两个appender - CONSOLEFILE
我们是否需要在生产中使用这两个附加程序?
是否可以仅使用 FILE 附加程序?

我从 web\conf\jboss-log4j.xml 中删除了 CONSOLE 附加程序,但控制台中仍然有很多痕迹。
为什么?
我不想在生产中的控制台中留下痕迹。
是否可以关闭 CONSOLE 附加程序?

By default there are two appenders in JBoss5.1 - CONSOLE and FILE.
Do we need to use both of these appenders in production?
Is it possible to use FILE appender only?

I removed CONSOLE appender from web\conf\jboss-log4j.xml but there are still a lot of traces in console.
Why?
I do not want traces in console in production.
Is it possible to turn CONSOLE appender off?

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

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

发布评论

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

评论(2

后来的我们 2024-08-31 04:09:35

也许是 run.sh 或 run.bat 的输出,不使用 log4j。

你是windows还是linux?

当您启动或部署(或使用)应用程序时,您是否看到输出?

Maybe it's the output of the run.sh or run.bat, that doesn't use log4j.

Are you on windows or linux?

Do you see the output when you're booting or when you're deploying (or using) your application?

寂寞花火° 2024-08-31 04:09:35

CONSOLE 附加程序对于开发很有用,特别是在 Windows 上,其中应用程序服务器作为前台控制台进程运行。此外,Windows 使得像在 *nix 上那样跟踪日志文件变得相当困难。

所以不,您不必使用控制台附加器。你可以在log4j文件中放入你喜欢的任何内容,默认的就是默认的。删除附加程序,或添加它们,只要您认为合适。

The CONSOLE appender is useful for development, particularly on Windows, where the appserver is run as a foreground console process. Also, Windows makes it rather hard to tail a log file like you can on *nix.

So no, you don't have to use the console appender. You can put whatever you like in the log4j file, the default is just the default. Remove appenders, or add them, however you see fit.

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