java - Configure log4j to send email -


in log4j.properties have

log4j.appender.console=org.apache.log4j.consoleappender log4j.appender.console.layout=org.apache.log4j.enhancedpatternlayout log4j.appender.console.layout.conversionpattern=%d{iso8601} %-5p [correlation-ids:%x{x-caap-correlation-id},user:%x{x-caap-user}] [%t] (%c:%l) %x{camel.routeid}- %m%n  log4j.logger.com.lacapitale=info log4j.logger.org.apache.cxf=info log4j.logger.org.apache.camel=debug log4j.logger.org.springframework=info   log4j.appender.smtp=org.apache.log4j.net.smtpappender log4j.appender.smtp.buffersize=1 log4j.appender.smtp.from=noreply@mycompany.com log4j.appender.smtp.smtphost=localhost log4j.appender.smtp.subject=[{{appid}}] - erreur technique log4j.appender.smtp.threshold=info log4j.appender.smtp.to=me@mycompany.com log4j.appender.smtp.layout=org.apache.log4j.patternlayout log4j.appender.smtp.layout.conversionpattern=%d{iso8601} %-5p %m%n  log4j.rootlogger=info, console  log4j.logger.email=info, smtp 

but, never email when log info.

is there wrong in config?

is because deployed app in eclipse embedded tomcat? tomcat include smtp server?

tomcat not include smtp server. need make sure smtphost have defined has mta installed, running, , accepting connections.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -