2 Replies Latest reply on Aug 31, 2006 3:05 AM by wxjpxp

    How to make two web modules to share one log file?Help me!!!

    wxjpxp

      It is too complex a problem for me!I have two web apps,oned named web1,another named web2.
      1: I want them to share a log file "web1.log".
      2: I do not want those output message from them to appear in server.log.

      how can make it ?

      I add these code below to log4j.xml,but it won't work !


      ......................

      ....................




      <appender-ref ref="web1"/>




      All of the two web module use the package "mypackagename",so i mean to use this newly added category and appender to meet my need,but the output is utterly disorderly.



        • 1. Re: How to make two web modules to share one log file?Help m
          wxjpxp

          I add these code below to log4j.xml,but it won't work !

          appender name="web1" class="org.jboss.logging.appender.DailyRollingFileAppender"
          ......................
          param name="File" value="${jboss.server.log.dir}/web1.log"
          ....................
          /appender

          category name="mypackagename" additivity="false"
          priority value="INFO" /
          appender-ref ref="web1"/
          /category



          All of the two web module use the package "mypackagename",so i mean to use this newly added category and appender to meet my need,but the output is utterly disorderly.

          • 2. Re: How to make two web modules to share one log file?Help m
            wxjpxp

            on the upper post,i remove all "<" and ">",because the page can not display them.