Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parse a complex log file stacktrace

User_19BPUOct 9 2013 — edited Oct 9 2013

Hi,

I have a complex log file from which I need to retrieve only the stack trace.
Here I am not usng a regex, as the log file is so complex and providing a keyword
for regex itself is tough. Hence I was thinking about the below options:-

1) Write only the log stacktrace in a separate .log file
2) Add a opening and closing tags only for log stacktrace so that it can be easily parsed.

Please provide your suggestion on the same. If i have to implement the first option how i can go about it?
what changes i need to make to log4j xml file? Similarly for the second option how we can do it?
Please clarify.

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2013
Added on Oct 9 2013
1 comment
399 views