By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,363 Members | 3,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,363 IT Pros & Developers. It's quick & easy.

log4j SMTPAppender -- combining messages into one e-mail?

P: n/a

I'm trying to use log4j's SMTPAppender to get warnings and errors reported
by our application via e-mail (in addition to having ALL messages saved
into a file via RollingFileAppender).

It all works, except for one thing -- every warning/error arrives in its own
e-mail message...

The BufferSize parameters appears intended to regulate this, but no matter
what I set it to (tried different values from 1 to 102400), exactly one
log-message per e-mail are still generated...

Any ideas? Thanks!


Here is my current file:

log4j.rootLogger=DEBUG, A1, mail
log4j.appender.A1=org.apache.log4j.RollingFileAppe nder

log4j.appender.A1.layout=org.apache.log4j.PatternL ayout

# Pattern to output the caller's file name and line number.
log4j.appender.A1.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n der
log4j.appender.mail.Subject=Testing log4j email
log4j.appender.mail.layout=org.apache.log4j.HTMLLa yout

Feb 20 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.