I found a possible solution. Within ch.qos.logback.classic.spi.ThrowableProxy, replace the default constructor with the following field, constructors and method:
Basically, it will use an IdentityHashMap to maintain the throwable proxies created, partially skipping those that have already been processed.
To minimize the string concatenation, the message could just be shortened to throwable.getMessage(), although something must be prepended to the class name to indicate its a circular reference.
The above code would then generate:
ERROR ROOT - Error
java.lang.Exception: null
at NewClass.main(NewClass.java:20) ~[classes/:na]
Suppressed: java.lang.Exception: null
at NewClass.main(NewClass.java:21) ~[classes/:na]
Suppressed: [CIRCULAR REFERENCE:java.lang.Exception: null]
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
I found a possible solution. Within ch.qos.logback.classic.spi.ThrowableProxy, replace the default constructor with the following field, constructors and method:
Basically, it will use an IdentityHashMap to maintain the throwable proxies created, partially skipping those that have already been processed.
To minimize the string concatenation, the message could just be shortened to throwable.getMessage(), although something must be prepended to the class name to indicate its a circular reference.
The above code would then generate: