5 Replies Latest reply on Jul 3, 2012 9:24 AM by aslamcl

    Logging not working in AS 7.1 Final.

    aslamcl

      My application writes logs in a file. It works perfectly in tomcat, jboss 5.1 etc.

      But logs are not coming in AS7.1 Final.

       

      Note: I am not toking abt server log, where the log is coming perfectly. I am talking abt the file which I have configured for loggin purpose.

       

      below are the log related jars in my lib folder.

       

      commons-logging-1.1.jar

      log4j-log4j-1.2.12.jar

      log4j-over-slf4j-1.4.3.jar

      logback-classic-0.9.8.jar

      logback-core-0.9.8.jar

      logkit-1.0.1.jar

      commons-logging-api-1.0.4

      org.apache.log4j-log4j-1.2.12

       

      Plz help.

        • 1. Re: Logging now working in AS 7.1 Final.
          ctomc

          remove all of the above mentionend jars and it should work

           

           

          --

          tomaz

          • 2. Re: Logging now working in AS 7.1 Final.
            jamezp

            That's a whole lot of logging configurations :-). Do you also have a logging configuration you're trying to use or are you going to configure your log handlers (appenders) through the logging subsystem? The later gives you runtime configuration changes.

             

            --

            James R. Perkins

            • 3. Re: Logging now working in AS 7.1 Final.
              aslamcl

              James, I do have logging configurations inside my war file. So by "log handlers through logging subsytem"  what do you mean actually?

              • 4. Re: Logging now working in AS 7.1 Final.
                jamezp

                Aslam,

                What I mean is configure it through the CLI, web console or any management interface. That would allow for runtime changes to your configuration. If you want to use your own static configuration you can. In 7.0.x and 7.1.x you'll need to exclude the servers logging libraries through the jboss-deployment-structure.xml as described here.

                 

                --

                James R. Perkins

                • 5. Re: Logging now working in AS 7.1 Final.
                  aslamcl

                  James, I fixed the issue by giving following things in jboss-deployment-structure.xml as it is given in the link provided by you.

                   

                   

                  <jboss-deployment-structure>

                   

                      <deployment>

                          <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->

                          <exclusions>

                              <module name="org.apache.log4j" />

                          </exclusions>

                      </deployment>

                  </jboss-deployment-structure>

                   

                  It worked. Thanks alot