1

I'm trying to log errors through email using Log4j2.
For that purpose Log4j2 defines the SMTPAppender, and an example configuration is provided to use in the XML config file, which is like:

<appenders>
  <SMTP name="Mail" suppressExceptions="false" subject="Error Log" to="errors@logging.apache.org"
  from="test@logging.apache.org" smtpHost="localhost" smtpPort="25" bufferSize="50">
  </SMTP>
</appenders>


So everything should be fine. But when i start the application and force an error to log i receive this message:

ERROR Error processing element SMTP: CLASS_NOT_FOUND


Ok, now what to do? the documentation gives a hint, plugins, and packages should be used, both of which have little documentation, and no examples.

I got another hint in: ClassNotFoundException javax.mail.internet.AddressException when running hibernate3:hbm2ddl but this is log4j2 and not log4j.

Any help is, of course, greatly appreciated.

Community
  • 1
  • 1
Anibaru
  • 193
  • 1
  • 2
  • 12
  • Why i cant, start a question with normal greetings, like hi everyone, or hello everyone? the always get deleted ... – Anibaru Mar 05 '13 at 15:00

1 Answers1

0

The answer was easy.
After reading this https://blogs.apache.org/logging/entry/apache_log4j_2_0_beta4
I downloaded the beta4 (i had the beta3) and now i have other problems, but the appender works.

Anibaru
  • 193
  • 1
  • 2
  • 12