1

In logback the SMTPs are sent asynchronously (as they obviously should be), however in my testing these emails seem to be canceled if the application is shutting down. This is very not good as I need to be notified that my application encountered a fatal error - this is literally the worst time to NOT receive an email. How to do this?

djechlin
  • 59,258
  • 35
  • 162
  • 290

1 Answers1

1

Achieved this by sending high-level, important emails synchronously instead of on separate, daemon thread, which logback, correctly, does by default.

In appender:

        <asynchronousSending>false</asynchronousSending>
djechlin
  • 59,258
  • 35
  • 162
  • 290