3 Replies Latest reply on Oct 26, 2007 11:05 AM by peterj

    Separate log for deployed webapp in JBOSS 4.2.1.GA

    mauroarc

      I want separate my application log in separate log file under jboss/server/default/log but i'm not able to do it.

      I have configured my categories and appender(in jboss-log4j.xml) to log in a separate log file from server.log, but it doesn't work.

      In my web app i get Logger with org.apache.commons.logging.LogFactory

      When i launch jboss, there are no application logs written in my separate log file. I have seen e tried instructtion on http://wiki.jboss.org/wiki/Wiki.jsp?page=SeparatingApplicationLogs
      but in doesn't work...This is very frustrastring issue, Please someone can help me?

        • 1. Re: Separate log for deployed webapp in JBOSS 4.2.1.GA
          peterj

          Please post the relevant sections of jboss-log4j.xml.

          • 2. Re: Separate log for deployed webapp in JBOSS 4.2.1.GA
            mauroarc

            <!-- A time/date based rolling appender -->







            <!-- Rollover at midnight each day -->
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>

            <!-- Rollover at the top of each hour
            <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
            -->


            <!-- The default pattern: Date Priority [Category] Message\n -->


            <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n

            -->




            <!-- ============================== -->
            <!-- Append messages to the console -->
            <!-- ============================== -->







            <!-- The default pattern: Date Priority [Category] Message\n -->











            <!-- Rollover at midnight each day -->
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>

            <!-- Rollover at the top of each hour
            <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
            -->


            <!-- The default pattern: Date Priority [Category] Message\n -->


            <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n

            -->






            <appender-ref ref="wfWebAppLog"/>



            <appender-ref ref="CONSOLE"/>
            <appender-ref ref="FILE"/>

            • 3. Re: Separate log for deployed webapp in JBOSS 4.2.1.GA
              peterj

              Try again, this time bracketing the xml content with "[ code ]...[ /code ]" (without the spaces), or aleternatively select the XML text and click the Code button. And please Preview the post before submitting it!