1 Reply Latest reply on Feb 1, 2006 6:26 AM by Kaj Bjurman

    Web app with separate log4j.jar

    Kaj Bjurman Newbie

      Hi all,

      I've been googling for a while, and found some web pages which explained how to configure JBoss so that your web app could have a separate version and configuration of log4j

      Basically I added this to jboss-web-xml of the web app:

      <class-loading java2ClassLoadingCompliance="false">
      <loader-repository>
      log4j.test:loader=TS.war
      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      </loader-repository>
      </class-loading>

      I can see in the server.log that our log4j.xml file gets loaded, and our log file is created. All of our classes and some third party classes are logging to our log file, but hibernate does for some reason still log into server.log.

      Why is it like that? Is there something special about the combination of hibernate and jboss? I can see that hibernate uses the log4j configuration from the jboss conf directory (since changes in that file affects the output from hibernate)

      Where should I start looking? Any tips?

      Thanks
      Kaj