0 Replies Latest reply on May 11, 2013 5:56 AM by pierswalter

    how to configure log4j in JBoss 6?

    pierswalter

      I am migrating an application from JBoss 4 to JBoss 6 and stumble over the fact that log4j does not seem to be supported out of the box any more.

      Our previous setup with a log4j.xml configuration file in server/default/conf/ no longer works. That configuration files does not seem to be detected and used by JBoss 6.

      Basic logging (as configured in server/default/deploy/jboss-logging.xml) works, but I have not been successful in configuring log4j appenders in that file.

       

      For example, I've modified jboss-logging.xml to use a log4j console appender and a log4j file appender (see attached file). This did not work. The log file ${jboss.server.log.dir}/log4j.log is not created, the console log stays at level INFO (instead of DEBUG).

       

      What would I have to do in order to get JBoss to use log4j for my applications?

      One requirement we have is to not store the log4j configuration in a central file and not within the applications (because for debugging purposes we ask our customers to modify the configuration).

       

      Thanks a lot

      Piers