How can I configure log4j to not print the exception stacktrace?

前端 未结 8 2371
攒了一身酷
攒了一身酷 2020-12-09 09:52

We use Log4j (and Commons Logging) to log our error messages. Now we want to set up an additional log appender that outputs fatal errors to syslog, but without the exception

8条回答
  •  醉话见心
    2020-12-09 10:38

    The "nopex" or "nopexception" conversion word in logback-classic (log4j's successor) disables printing stack traces. The "nopex" conversion word is documented along with the rest of conversion words. You need to scroll down a little.

    If you need further information on this topic, please contact the logback-user mailing list.

提交回复
热议问题