I'm trying to configure Log4j to send an email when an error is detected in the JobControlServer logs. Currently, I have it set to Rollfile (which works fine) and have added the SMTP appenders. But whenever I stop the JSC service and restart, it fails to restart. I can't find anything on this site or the documentation to help. I read through the log4j documentation, but I'm stuck on this one piece.
I have log4j.debug turned on but I don't know where to find the system.out log for it.
Here's the parts of the log4j.properties file I have set up in \Workload Control Center\Logs\Application\JobControlServer:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
# do not comment the following line
log4j.loggerFactory=com.ca.uejm.admin.servlet.logger.CoreLoggerFactory
log4j.debug=TRUE
log4j.rootLogger=ERROR,ROLLFILE,SMTP
log4j.appender.ROLLFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLFILE.File=E:/Program Files (x86)/CA/Workload Control Center/Logs/application/jobcontrolserver/uejm_jobconsole_server.log
log4j.appender.ROLLFILE.MaxFileSize=200KB
log4j.appender.ROLLFILE.MaxBackupIndex=10
log4j.appender.ROLLFILE.layout=org.apache.log4j.PatternLayout
#log4j.appender.ROLLFILE.layout.ConversionPattern=[ <%t> [%x] ] %p %d %c - MethodName[ %M ]: %m%n
log4j.appender.ROLLFILE.layout.ConversionPattern=[ <%t> [%x] ] %p %d %c{2} %m%n
#added smtp appender
log4j.appender.SMTP=org.apache.log4j.net.SMTPAppender
log4j.appender.SMTP.SMTPHost=smtp.me.com
log4j.appender.SMTP.From=admin@me.com
log4j.appender.SMTP.To=me@me.com
log4j.appender.SMTP.Subject=Admin app error log
log4j.appender.SMTP.BufferSize=1
log4j.appender.SMTP.EvaluatorClass=TriggerLogEvent
log4j.appender.SMTP.layout=org.apache.log4j.PatternLayout
log4j.appender.SMTP.layout.ConversionPattern=%m
Thanks for any help.