Limit Number of stack trace lines in JSONLayout

Viewed 171

I am trying to print my application logs using log4j2-<JsonLayout/>. The problem I am facing is - for some of the logs, the stackTrace becomes too huge as <JsonLayout/> prints extendedStackTrace for every nested exception.

The goal is to have extendedStackTrace, or the stackTrace in log message but upto a certain limit.

is there a way to limit number of lines in extendedStackTrace?

0 Answers
Related