smtpappender

log4j2 SMTP Appender: How to include previous messages with another level?

五迷三道 提交于 2019-12-03 03:40:36
I'm using log4j2-beta9 and I have the following config (part of it): <Appenders> <SMTP name="Mailer" suppressExceptions="false" subject="${subject}" to="${receipients}" from="${from}" smtpHost="${smtpHost}" smtpPort="${smtpPort}" smtpProtocol="${smtpProtocol}" smtpUsername="${smtpUser}" smtpPassword="${smtpPassword}" smtpDebug="false" bufferSize="20"> <PatternLayout> <pattern>%d{dd-MM-yyyy HH:mm:ss,SSS} %5p %m%n</pattern> </PatternLayout> </SMTP> <Async name="AsyncMailer"> <AppenderRef ref="Mailer"/> </Async> </Appenders> <Loggers> <Root level="info"> <AppenderRef ref="AsyncMailer" level=

Log4j2: SMTPAppender does not send mails with error or fatal level

早过忘川 提交于 2019-12-01 04:37:40
I recognized some problems with the SMTPAppender in log4j2. Whenever log events with the level error or fatal are created without having an event with the level info before no mail is sent and the fatal event disappears. Here is my log4j2 configuration file (log4j2.xml) and a small program (LogTest.java) to reproduce the problem: <?xml version="1.0" encoding="UTF-8"?> <configuration status="warn"> <!-- mail server configuration --> <properties> <property name="receipients">me@example.com</property> <property name="from">me@example.com</property> <property name="smtpHost">smtp.example.com<

Log4j2: SMTPAppender does not send mails with error or fatal level

核能气质少年 提交于 2019-12-01 03:16:08
问题 I recognized some problems with the SMTPAppender in log4j2. Whenever log events with the level error or fatal are created without having an event with the level info before no mail is sent and the fatal event disappears. Here is my log4j2 configuration file (log4j2.xml) and a small program (LogTest.java) to reproduce the problem: <?xml version="1.0" encoding="UTF-8"?> <configuration status="warn"> <!-- mail server configuration --> <properties> <property name="receipients">me@example.com<