如何仅生成错误级别的电子邮件?当前,电子邮件附加程序正在为所有日志记录事件生成消息。
appender.email = org.apache.log4j.net.SMTPAppender
appender.email.type = smtp
appender.email.name = Email
appender.email.smtpHost = smtp.google.com
appender.email.from = xxxx@gmail.com
appender.email.to = xxxx@gmail.com
appender.email.cc = xxxx@gmail.com
appender.email.subject = Error in application
appender.email.layout.type = HTMLLayout
appender.email.Threshold = ERROR
logger.foo.appenderRefs = smtp
logger.foo.level = info
logger.foo.additivity = false
logger.foo.appenderRef.smtp.ref = Email