activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billy <Billy.Buzz...@bnsflogistics.com>
Subject Log4j SMTPAppender not working within ActiveMQ-Camel
Date Mon, 12 Sep 2011 18:18:05 GMT
I want to email WARNINGs and above in my log file to myself, but I'm having
trouble getting the Log4j SMTPAppender to work in ActiveMQ.  I created a
small java test program and verified that my Log4j SMTPAppender properties
are correct and that I can send myself an email, but when I copy these
properties the log4j.properties file that ActiveMQ uses, nothing seems to
work.  My test program is using the activation-1.1.jar, log4j-1.2.14.jar and
commons-logging-1.4.jar from ActiveMQ's lib folders. I'm also dropped
javamail 1.4.1's mail.jar into the ActiveMQ lib folder and I'm using it too. 

Has anyone else run into the problem and know how to fix it?

Here's what I have in my log4j.properties file:

log4j.rootLogger=DEBUG, console, logfile, MAIL

# Console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%5p | %m%n
log4j.appender.console.threshold=INFO

# File appender
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.file=TestLog4jSmtp.log
log4j.appender.logfile.maxFileSize=1024KB
log4j.appender.logfile.maxBackupIndex=5
log4j.appender.logfile.append=true
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n

# Mail appender
log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender
log4j.appender.MAIL.BufferSize=10
log4j.appender.MAIL.SMTPHost=smtp2.mycompany.com
log4j.appender.MAIL.From=root@esbp01
log4j.appender.MAIL.to=billy@mycompany.com
log4j.appender.MAIL.Subject=(TEST) ESB Router Alert
log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.MAIL.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
log4j.appender.MAIL.threshold=WARN


--
View this message in context: http://activemq.2283324.n4.nabble.com/Log4j-SMTPAppender-not-working-within-ActiveMQ-Camel-tp3808210p3808210.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message