I found my way to http://wiki.jboss.org/wiki/Wiki.jsp?page=ScopedLoggingConfig, it worsk fine. However one annoying problem stil persists. When my application logs to console, the ouputs are catched and wraped by JBoss console logger:
11:39:15,368 INFO [STDOUT] 2006-09-15 11:39:15,368 INFO [cz.dmkconsulting.gc.InitLog4jListener] - Testing Logging Setup ...
Can I fix this somehow?
The jboss.system:service=Logging,type=Log4jService MBean as two attributes: CatchSystemErr and CatchSystemOut. You might try adjusting these settings to false (both default to true) either using the JMX console or in $JBOSS_HOME/server/$SERVER_CONFIG/conf/jboss-service.xml to see if this will give you the behavior you want.