1 Reply Latest reply on Jan 10, 2007 11:45 AM by peterj

    Multiple Logs Is it possible?

    okmred

      I currently have several wars in my deploy directory.
      I'd like to have different log files for each, is that possible?

      How would I set that up?
      Thanks

        • 1. Re: Multiple Logs Is it possible?
          peterj

          I think this will work. Assume two war files, war1 and war2. The classes in war1 have package name org.war.one, and the classes in war2 have package name org.war.two.

          Update the log4j.xml file, adding an appender for each log file (see the existing "FILE" appender as an example). Then add categories for each appender as follows:

          <category name="org.war.one">
           <priority value="DEBUG"/>
           <appender-ref ref="FILE-4-WAR1"/>
          </category>
          <category name="org.war.two">
           <priority value="DEBUG"/>
           <appender-ref ref="FILE-4-WAR2"/>
          </category>