views:

119

answers:

2

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?

+1  A: 

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.

skaffman
+1  A: 

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?

volothamp