0 Replies Latest reply on Apr 30, 2013 1:56 PM by klind

    Logback JBoss 7 classpath problem !!!

    klind Newbie

      This is regarding to

       

      https://community.jboss.org/message/807588

       

      Really need to get this fixed ASAP


       

      ear
      - server.jar
      - webservice.war
      - jsi-dashboard.war
      - META-INF
           - jboss-deployment-structure.xml
           - application.xml
      - lib
           - xyz.jar
      
      

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
                <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
                <deployment>
                          <exclusions>
                                    <!-- Exclude slf4j 1.6.1, we added new module in jboss with 1.7.3 -->
                                    <module name="org.apache.commons.logging" />
                                    <module name="org.slf4j" />
                                    <module name="org.slf4j.ext" />
                                    <module name="org.slf4j.jcl-over-slf4j" />
                                    <!-- Exclude slf4j-jboss-logmanager, we want to use logback that we added as a module -->
                                    <module name="org.slf4j.impl" />
                                    <module name="org.apache.log4j" />
                          </exclusions>
                          <dependencies>
                              <!-- add our own modules -->
                                    <module name="ch.qos.logback" />
                                    <module name="org.slf4j" slot="1.7.3"/>
                                    <module name="com.farheap.jsi"/>
                          </dependencies>
                </deployment>
      
      
                <sub-deployment name="jsi-dashboard.war">
                          <exclusions>
                                    <module name="org.apache.commons.logging" />
                                    <module name="org.slf4j" />
                                    <module name="org.slf4j.ext" />
                                    <module name="org.slf4j.jcl-over-slf4j" />
                                    <module name="org.slf4j.impl" />
                                    <module name="org.apache.log4j" />
                          </exclusions>
                          <dependencies>
                                    <module name="ch.qos.logback" />
                                    <module name="org.slf4j" slot="1.7.3"/>
                                    <module name="com.farheap.jsi"/>
                          </dependencies>
                </sub-deployment>
      
                <sub-deployment name="webservice.war">
                          <exclusions>
                                    <module name="org.apache.commons.logging" />
                                    <module name="org.slf4j" />
                                    <module name="org.slf4j.ext" />
                                    <module name="org.slf4j.jcl-over-slf4j" />
                                    <module name="org.slf4j.impl" />
                                    <module name="org.apache.log4j" />
                          </exclusions>
                          <dependencies>
                                    <module name="ch.qos.logback" />
                                    <module name="org.slf4j" slot="1.7.3"/>
                                    <module name="com.farheap.jsi"/>
                          </dependencies>
                </sub-deployment>
        </jboss-deployment-structure>
      

       

       

       

      The logback.xml is located and scanned every 30 seconds.

      The log file specified in the logback file is created.

       

      When setting log level to DEBUG in logback.xml on a package in the xyz.jar file, the debug is printet in the application log file, the jboss server log file and the console... happy happy

      <logger name="com.farheap.jsi.property.Configuration" level="DEBUG" />

       

      When setting log level to DEBUG in logback.xml on a package in the server.jar file, the debug is not printet anywhere... even though I can see on the logback INFO in the console, that the debug level was changed on that package.    The same thing if I start the server with DEBUG on a package in server. jar ( same thing with the war files )

      <logger name="com.farheap.jsi.ws" level="DEBUG" />

       

      When setting log level to DEBUG in standalone.xml on a package in the server.jar file, the debug is printet in the jboss server log file. ( after server restart )

      <logger category="com.farheap.jsi.ws">       <level name="DEBUG"/> </logger>

       

      I guess this has something to with the class loading of JBoss.

       

      I of cause want all my debug stuff from the application, to go in the application log file, specified in the logback.xml file. But Only the code from the xyz.jar file is working....