This content has been marked as final.
Show 1 reply
-
1. how to load log4j smtp appender custom evaluator class befor
acchillies Jul 28, 2009 1:40 PM (in response to acchillies)"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@imail.org"/> <param name="From" value="SepsisAlert@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.