I'm using Logback's SMTPAppender to send e-mails when certain logging events occur on my Tomcat.

The SMTPAppender can send e-mails asynchronously. Then however shutting down Tomcat fails because Tomcat can't close SMTPAppender's thread pool.

Is it somehow possible to close this thread pool when Tomcat is shutting down?

有帮助吗?

解决方案 2

其他提示

if you're using Tomcat, it seems that configuring Logback's Tomcat valve should resolve this issue for you:

http://logback.qos.ch/access.html

Configuring the Valve will result in Tomcat automatically shutting down the associated ExecutorService upon shutdown.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top