I need to write small a log analyzer application to process some log files generated by a 3rd party closed source library (having custom logger inside) used in my project. <
Can't you do something with Thread.currentThread().getStackTrace()
?
Here's a real simple example which calls a method recursively 20 times and then dumps out the stack of the current thread.
public class Test {
public static void main(String[] args) {
method();
}
static int x = 0;
private static void method() {
if(x>20) {
StackTraceElement[] elements = Thread.currentThread().getStackTrace();
for(int i=0; i