i need to write a script to find the count of traces in the log and generate a report.
trace looks something like this...
Code:
[10/10/08 09:12:25:539 CDT] SEVERE 00000060 efox1dsKSNHRz7_pf4K2_z3 com..billing.UpdateCard
Correlation Identity: 767718e0-96d5-11dd-8f9a-82e948eef517
Additional Data:
null
Current exception:
Message:
_ERR_COMMAND_EXCEPTION
Stack trace:
"java.lang.NullPointerException".
at com.command.ECCommandTarget.executeCommand(ECCommandTarget.java(Compiled Code))
at com.command.CommandCache.executeCommand(CommandCache.java(Compiled Code))
.
.
End of exception traces.
Text in between 'Stack trace:' and 'End of exception traces.' is one trace.
I tried the below methods, but dint get expected result.
Code:
my $exStart ="Stack trace";
my $exEnd = "End of exception traces.";
1. if(/$exStart/ ... /$exEnd/){
2. split(/^$exStart.*$exEnd/, <FH>);
the problem is, it is getting the text from first 'Stack trace:' to last 'End of exception traces.'
please help