0 Replies Latest reply on Aug 12, 2005 7:09 PM by sfdsf sdfsdf

    Cannot Make a Web Log with Jboss

    sfdsf sdfsdf Newbie

      (Reposting because first one trimmed out the XML pastings... Sorry ;)

      The docs I have found do not seem to work for logging in general, and I can find nothing at all anywhere with regards to performing the following simple task:

      Log web requests (http) to webserver.log file.

      Here's what I did in log4.xml:

      1. Added a New appender called WEBLOG:

      <appender name="WEBLOG" class="org.jboss.logging.appender.DailyRollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="File" value="${jboss.server.home.dir}/log/webserver.log"/>
       <param name="Append" value="true"/>
      
       <!-- 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"/>
       -->
      
       <layout class="org.apache.log4j.PatternLayout">
       <!-- The default pattern: Date Priority [Category] Message\n -->
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
      
       <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
       <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
       -->
       </layout>
       </appender>


      2. Added the following categories to this appender in a futile attempt to capture web traffic:

      <category name="org.apache">
       <appender-ref ref="WEBLOG"/>
       <priority value="TRACE" />
      </category>
      
      <category name="org.jboss.web">
       <appender-ref ref="WEBLOG"/>
       <priority value="TRACE" />
      </category>
      
      <category name="org.apache.catalina">
       <appender-ref ref="WEBLOG"/>
       <priority value="TRACE" />
      </category>


      3. Finally added WEBLOG to the root and restarted:

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


      According to my reading of the docs, this should have logged Apache and Tomcat based stuff to webserver.log file.

      However, all this does is make an empty file called webserver.log. Everything is still logged to server.log. I have never once been able to get a single byte logged to a third log file no matter what configuration I try.


      So it just doesn't appear work as documented. Shrug. Is it even possible to do what I want? Do I have to interpose Apache just to get some standard web logs happening?