I have a java stack error message and I would like to extract "Caused by" line from the full error message.
I had followed the instructions stated in the below post :
I was able to achieve the results but with a minor issue :
The line that I want to print is :
java.lang.ClassCastException: weblogic.jms.common.DestinationImpl cannot be cast to javax.jms.ConnectionFactory
However the line being extracted is :
I know something needs to be changed in the below code. But I have no knowledge on ruby...Suggestions please...
The ruby code used is :
code => "
s = event.get('logmessage')
r = s.scan(/Caused By: ([^:]+):/)
r = r.flatten