title: Making exception on log4j json parsable
body: <p>I am trying to 'jsonify' logs using pattern layout :</p>
  <p>{&quot;timestamp&quot;:&quot;%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}{UTC}&quot;,&quot;log-level&quot;:&quot;%5p&quot;,&quot;loggerName&quot;:&quot;%logger{1}&quot;,&quot;thread-id&quot;:&quot;%t&quot;,&quot;process-id&quot;:&quot;%pid&quot;,&quot;message&quot;:&quot;%enc{%m}{JSON}&quot;,&quot;exception&quot;:&quot;%ex{100}&quot;}%n</p>
  <p>However, in case of exceptions logs are getting printed in multiple lines as part of stack trace which is not parsable json. I want to keep stack trace information but also make in json parsable. How I can do it using pattern layout or writing some custom layout .</p>