3 Replies Latest reply on May 17, 2004 9:26 AM by Ravi Shankar

    Rerouting all login messages

    Ravi Shankar Newbie

      HI all,

      First of all thanks a lot for this wonderful AOP based tool.

      Now the problem:- We have many J2EE applications deployed in JBoss. Each application is a set of one or more components. Each component belongs to different teams. The owner of each component has included their own log4j based logging into their component. Now the team who is integrating all these disparate pieces of components cannot see these logged messages since those messages go to the URLs only the owners of those components could access. Hence the integrator has to send emails across to find out what happenede in the system.

      WHat I would like to do is to build a Javassist based tool( am I correct) which will dynamically inspect all these existing logging lines, and add equivalent lines so as to route/repeat those in the final integrated system, so that the final integrator need not rely component teams for analysing logs. It will be great if we can passivate the existing logging messages and re-route them to a central place to view.

      Now can I do this with Javassist ? Assume that I know the existing log messages are built on log4j.

      Thanks , your help is greatly appreciated.

      Best regards,

        • 1. Re: Rerouting all login messages
          Shigeru Chiba Expert

          Yes, it should be possible.

          • 2. Re: Rerouting all login messages
            Jwahar Bammi Newbie

            While this is possible with the wonderful javassist
            i would not use javassist in this particular instance. log4j has a very flexible architecture, and you can do what you want to do by just changing the log4j configuration files, without changing your java class files at all.


            • 3. Re: Rerouting all login messages
              Ravi Shankar Newbie

              HI Bammi,

              It might be possible with log4j configuration files, but cannot be done in our environment.

              This is because in our company, different components belong to different teams and each of them have their own configurations. We are not allowed in theory to change them since we are not the owners. All we get is an "ear" file which combines may be at least 20-30 different components. Hence I would prefer to use javassist to take this ear as input and create another ear as output which makes a weaving in all places were log4j statements are there and write an equivalent log to our convenient location. This way I need not depend on other application teams to tell the logs.

              What's your valuable advise in such a scenarion? Thanks a lot