I am using Mirth Connect v3.0.1 and I would like to set up log4j to email any errors that occur. I have set up the appender in the log4j.properties file:
However, I am not receiving emails from my sample channel, although the errors do appear in the mirth.log:
ERROR 2014-11-26 16:15:51,903 [pool-3-thread-1] deploy: This is a test
FATAL 2014-11-26 16:15:52,435 [pool-3-thread-1] js-connector: test reader
In other applications on this server I have log4j set up to send emails and it works OK. I also have Mirth sending emails from the channels and again that all works OK. It's just from log4j that nothing is happening, and there aren't even any errors being produced.
Is anyone else using the SMTPAppender in log4j with Mirth?
Code:
# sample properties to initialize log4j
log4j.rootLogger = ERROR,stdout,fout,smtp
# stdout appender
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
# file appender
dir.logs = logs
log4j.appender.fout = org.apache.log4j.DailyRollingFileAppender
log4j.appender.fout.File = ${dir.logs}/mirth.log
log4j.appender.fout.DatePattern = '.'yyyy-MM-dd
log4j.appender.fout.layout = org.apache.log4j.PatternLayout
log4j.appender.fout.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
# smtp appender
log4j.appender.smtp = org.apache.log4j.net.SMTPAppender
log4j.appender.smtp.SMTPHost = localhost
log4j.appender.smtp.From = mirth@server.com
log4j.appender.smtp.To = ops@server.com
log4j.appender.smtp.Subject = Test
log4j.appender.smtp.BufferSize = 1
log4j.appender.smtp.Threshold = WARN
log4j.appender.smtp.layout = org.apache.log4j.PatternLayout
log4j.appender.smtp.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
# splash screen
log4j.logger.com.mirth.connect.server.Mirth = INFO
# Mirth Connect channel logging
log4j.logger.transformer = DEBUG
log4j.logger.preprocessor = DEBUG
log4j.logger.postprocessor = DEBUG
log4j.logger.deploy = DEBUG
log4j.logger.shutdown = DEBUG
log4j.logger.filter = DEBUG
log4j.logger.db-connector = DEBUG
log4j.logger.js-connector = DEBUG
log4j.logger.attachment = DEBUG
log4j.logger.batch = DEBUG
log4j.logger.response = DEBUG
# SQL Logging
log4j.logger.java.sql = ERROR
However, I am not receiving emails from my sample channel, although the errors do appear in the mirth.log:
ERROR 2014-11-26 16:15:51,903 [pool-3-thread-1] deploy: This is a test
FATAL 2014-11-26 16:15:52,435 [pool-3-thread-1] js-connector: test reader
In other applications on this server I have log4j set up to send emails and it works OK. I also have Mirth sending emails from the channels and again that all works OK. It's just from log4j that nothing is happening, and there aren't even any errors being produced.
Is anyone else using the SMTPAppender in log4j with Mirth?
log4j SMTPAppender is not sending email
0 commentaires:
Enregistrer un commentaire