There are some exception classes that format a detailed message when we call toString(), but log4j v2
is just showing the stacktrace with the message set with Exception(String) constructor.
Are there ways to ask PatternLayout to log the "toString()" content of exceptions? Or those exceptions should be changed to set message instead of giving it with toString()?
Using ex{full}
at the convention pattern did the work.
Example of a full conversion pattern using it:
<Property name="global-pattern">%d{HH:mm:ss.SSS} [%pid/%t] %-5level %logger{36} %M:%L - %msg ex{full}%n</Property>