logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Rosenberg ...@tabbysplace.org>
Subject SMTPAppender Problems
Date Sat, 28 Jan 2012 20:27:32 GMT
I am trying to set up logging via email.  Here is the relevant parts
of my log4j.xml

	<appender name='severe' class='org.apache.log4j.net.SMTPAppender'>
		<param name='SMTPDebug' value='true' />
    	<param name='To' value='XXXX@tabbysplace.org' />
    	<param name='From' value='XXXX@tabbysplace.org' />
    	<param name='SMTPHost' value='tabbysplace.org' />
    	<param name='SMTPPort' value='25' />
     	<param name='SMTPUsername' value='XXXX@tabbysplace.org' />
    	<param name='SMTPPassword' value=',XXXXXX' />
    	<param name='Subject' value='CAS Sever Error' />
    	<param name='bufferSize' value='1' />
    	<layout class='org.apache.log4j.PatternLayout'>
    		<param name="ConversionPattern" value='%d{[ dd.MM.yyyy
HH:mm:ss.SSS]} [%t] %n%-5p %n%c %n%C %n %x %n %m%n' />
 		<filter class="org.apache.log4j.varia.LevelRangeFilter">
    		<param name="LevelMin" value="error" />
    		<param name="LevelMax" value="fatal" />
    <logger name='org.tabbysplace.sso' additivity='true'>
    	<level value='FATAL' />
    	<appender-ref ref='severe' />
    <logger name='org.tabbysplace.sso' additivity='true'>
    	<level value='INFO' />
    	<appender-ref ref='cas' />

Things were not working so I added the debugging flag.  I ran a bunch
of tests.  I see the console output, but except for 1 case (out of
dozens), there was no SMTP activity.

I then timed adding my own EvaluatorClass to see what was going on:

		<param name='EvaluatorClass' value='org.tabbysplace.casServer.Evaluator' />

This class writes to the console and tehn returns true.  The class is
never called.  It's as if the SMTPappender is heing ignored.

Any ideas?

Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message