I learned this from the Orielly Developer Notebook .... very helpfull by the 
way ....

in the log4j I made an entry for my app ...


  | 
  | <appender name="MYAPP" 
class="org.jboss.logging.appender.DailyRollingFileAppender">
  |       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |       <param name="File" value="${jboss.server.home.dir}/log/MYAPP.log"/>
  |       <param name="Append" value="false"/>
  | 
  |       <!-- 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>
  | 
  | 

then I specified the error I want to log ...


  | 
  |    <category name="MYAPP.web">// my class folder logging
  |      <priority value="ERROR"/>
  |      <appender-ref ref="MYAPP"/>
  |    </category>
  | 

then added to the root node ...

  |    <root>
  |       <appender-ref ref="CONSOLE"/>
  |       <appender-ref ref="FILE"/>
  |       <appender-ref ref="MYAPP"/>
  |       
  |    </root>
  | 

everything seems to be A-OK .... maybe if you specified 2 category names for 
the same app possibly .... just a thought





View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3901929#3901929

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3901929


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to