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

早过忘川 提交于 2019-12-01 04:37:40

At first glance this looks like a bug. Does it still happen if you remove the LogTest logger and configure your root logger like this?

<root level="info">
    <appender-ref ref="Console"/>
    <appender-ref ref="AsyncMailer"/>
</root>

FYI, if later you need different log levels on the different appenders you can achieve that like this (no need for a separate logger):

<root level="trace">
    <appender-ref ref="A" level="info" />
    <appender-ref ref="B" level="debug" />
</root>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!