是否可以在 JBoss 5.1 中禁用打印到控制台的跟踪?
默认情况下,JBoss5.1中有两个appender - CONSOLE和FILE。
我们是否需要在生产中使用这两个附加程序?
是否可以仅使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许是 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?
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.