简体   繁体   中英

Log4J SMTP appender issues

I like to use log4j smtp appender and i doubt is it effect to my application memory when it's tries to send too many emails.And where errors located (memory or other) before send? If application crashes then do i lost any "Errors" that not send yet?

If you are concerned with memory then investigate with eg "jvisualvm" in the JDK.

The contents of the mail and the events needed to generate it are stored in memory. I encourage you to investigate the source code.

If your application exits the JVM no more actions can be taken, but mails with errors should have been sent immediately. If this is a concern to you, then consider adding shutdown hooks to be run when the JVM is shutting down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM