I have been keeping wondering why my email appender is not working. The log4j xsd might be better if they can provide feedback on malformed configuration. Combine Threshold or logger level with SMTPAppender, without throwing exception is really confusing. While the only way to change logging level for SMTPAppender is actually implement and provide TriggeringEventEvaluator.
By default, an email message will be sent when an ERROR or higher severity message is appended. The triggering criteria can be modified by setting the evaluatorClass property with the name of a class implementing TriggeringEventEvaluator, setting the evaluator property with an instance of TriggeringEventEvaluator or nesting a triggeringPolicy element where the specified class implements TriggeringEventEvaluator.
while the xsd never warns the combination of threshold and levels with SMTPAppender,is confusing:
<appender name="emailAppender" class="org.apache.log4j.net.SMTPAppender"> <param name="SMTPHost" value="mailhost.core.blackrock.com" /> <param name="Threshold" value="DEBUG"/> <logger name="com.bfm.app.xxxx"> <level value="info" /> <appender-ref ref="emailAppender" />