2 Replies Latest reply on Sep 16, 2006 12:23 AM by jiwils

    JBoss 4.0.4.GA and logging



      what is the proper way to setup application logging? I have EJB3/Web application with init listener that initializes log4j with my configuration (stored in application). The logging from my application works fine, but JBoss logging stops working (just after I initialize log4j in my listener). How can I configure my application logging without modifying the JBoss/server/default/config/log4j.xml?

      (I use the same procedure as is described in JBoss at Work: A Practical Guide)

      Thanks Jan

        • 1. Re: JBoss 4.0.4.GA and logging

          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?

          Regards, Jan

          • 2. Re: JBoss 4.0.4.GA and logging

            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.