[jboss-user] [Advanced Documentation] - how to load log4j smtp appender custom evaluator class befor

acchillies do-not-reply at jboss.com
Tue Jul 28 13:40:38 EDT 2009


"acchillies" wrote : hello,
  | 
  | Here is my smtp appender configuration in jboss/server/conf/jboss-log4j.xml.
  |     <appender name="SMTP"
  |   |                class="org.apache.log4j.net.SMTPAppender">
  |   |         <param name="EvaluatorClass" 
  |   |                value="C:\\jbossBootPath\\CustomLogEvaluator.class" />
  |   |         <param name="Threshold" value="ERROR"/>
  |   |         <param name="SMTPDebug" value="true"/>
  |   |         <param name="To" value="kumar.mynam at imail.org"/>
  |   |         <param name="From" value="SepsisAlert at imail.org"/>
  |   |         <param name="Subject" value="Sepsis Server Errors"/>
  |   |         <param name="SMTPHost" value="smtp.ihc.com"/>
  |   |         <param name="BufferSize" value="512"/>
  |   |         <layout class="org.apache.log4j.PatternLayout">
  |   |             <param name="ConversionPattern"
  |   |                  value="[%d{ABSOLUTE},%c{1}] %m%n"/>
  |   |         </layout>
  |   |     </appender> 
  | 
  | When ever i start run.sh, it is throwing following exception.
  | log4j:ERROR Could not instantiate class [C:\jbossBootPath\CustomLogEvaluator.class].
  | java.lang.ClassNotFoundException: C:\jbossBootPath\CustomLogEvaluator.class
  | 
  | I have tried loading class using run.sh classpath as follows.
  | sh run.sh -c sepsis --classpath=/cygdrive/c/jbossBootPath/CustomLogEvaluator.class
  | 
  | Reason i am trying to use jboss/server/conf/jboss-log4j.xml instead of packaging log4j.xml inside application.ear is I would like to be able to modify the log level from INFO to DEBUG while server is running, without restarting the whole application.
  | 
  | Thanks,
  | kumar.

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

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



More information about the jboss-user mailing list