1

My WildFly server currenty displays every stacktrace line from errors written via STDERR as a seperate ERROR log entry. This wouldn´t be much of a problem, but because I use an SMTPAppender to send emails about new ERROR logs, it sends >100 emails for just one error (one for every stacktrace line)...
What I´d like to achieve is having one log entry with the stacktrace and therefore only one email being sent. For errors not written via STDERR this works totally fine.

I already tried controlling stderr entries like it is suggested here but it didn´t really help with my problem.

Is there any way to display errors written via stderr the same way like other errors? So that you only have informations like timestamp, log level, etc on the first line, and the stacktrace without those same informations?

Exsolutio
  • 11
  • 1
  • You're best option is to not use `Exception.printStraceTrace()` and use a logger for logging exceptions. Are you using some other console appender or handler? – James R. Perkins Feb 16 '21 at 23:29

0 Answers0