2 Replies Latest reply on Jan 29, 2003 9:14 AM by tomasz1

    separate log4j config files

    tomasz1

      Hi,

      this topic has been already discussed, I know, I haven't found any satisfying answer though.

      We have applications using log4j on its own. Partly in-house, partly third-party. While it is possible to move our own log4j configuration from our property files into /conf/log4j.xml, it will be a lot of trouble to make our suppliers change their WAR files.

      What we'd like is to be able to copy the WAR file into the deploy directory and just go.

      Is it possible to have logging configuration per application?

      If not, is it planned for?

      Thanks,
      Tomasz

        • 1. Re: separate log4j config files
          mikefinn

          Tomasz,
          Have you tried log4j forums or maillists? I am pretty this issue has been covered there. IIRC you can scope configs by *classloader*, using the logger repository mechanism. That said, I have not done it, and don't know if the default log4j config in JBoss may not be set up that way.

          HTH,
          Mike

          • 2. Re: separate log4j config files
            tomasz1

            Mike,

            I have looked at log4j mailing list, but haven't found anything yet. I have managed to control my own settings by adding my configuration to JBoss' log4j.xml file.

            The problem is that we also have third party software using log4j. They come as WAR files, so that we'd have to remove their log4j.properties from the WARs and add manually to that log4j.xml. It's troublesome, error-prone, contradicting the idea of self-contained WAR archives - put it into the ./webapps and it works.

            I think the solution would be for JBoss to have its own classloader with its own private instance of log4j classes, and for webapps to have theirs instance.

            This is why I asked, it might have been on the task list of JBoss development.

            Regards,
            Tomasz