3 Replies Latest reply on Nov 1, 2012 10:42 AM by rsmith1

    Logging Configuration

    rsmith1

      Using JBoss 7.1.0 standalone with logging configured in standalone.xml.

       

      I have not been able to figure this one out...

       

      I have 3 web applications that are deployed and logger categories for each: For example

       

      com.mycompany.app1

       

      com.mycompany.app2

       

      com.mycompany.app3

       

      Next I have a jar file that is used in each with package logging

       

      com.mycompany.common

       

      I have a handler for each of the 3 app level categories

       

      Each handler sends its output to a separate file. Here's my question - how can i route the com.mycompany.common to the application handler that it is being used in?

        • 1. Re: Logging Configuration
          jaysensharma

          This might help:

           

          https://issues.jboss.org/browse/AS7-514

           

           

           

          -Dorg.jboss.as.logging.per-deployment=false

           

          and

           

          http://middlewaremagic.com/jboss/?p=1458

          • 2. Re: Logging Configuration
            jamezp

            You do it the same way you did the others. Just define a logger with the category com.mycompany.common and add the handler to it.

             

            --

            James R. Perkins

            • 3. Re: Logging Configuration
              rsmith1

              James,

              It doesn't seem you understood the post.

              Obviously, creating a category and handler for common will allow common to be logged. The question is 'How do I direct common logging to specifc application logs?' In the scenario I'm describing, common is a library that exists in multiple applications.

              With standard application logging using log4j, it's easy to direct everything to your application log because each application has its own configuration.

              What I would like to be able to do is direct my common logging to the application log for the application it is being called from.