2

I have a lot of Android log in RichTextbox loaded from file. Lets say i search for "Fatal" word by default search method and i got this:

10-11 19:37:44.647 19525 19789 E AndroidRuntime: FATAL EXCEPTION: IntentService[ContactSaveService]

But, as I know there is possibility that there will be more than 1 exception in dumpstate. So i thought, it would be nice to compare file name with line of Fatal in this log.

File name: dumpstate_app_201210111708___error

Error log: 10-11 19:37:44.647

It doesnt match. So i would like to do something like this:

    if(rtb.Lines[i].contains(date_of_exception))
{

    rtb.Select(startPos, text.Length);
    rtb.ScrollToCaret();
    rtb.Focus();

}

Of course it doesnt work. I have no idea how to solve it. I thought about getting number of line with found text and search if this line contains date_of_exception

What I am sure. Time of fatal exception must be the same with time in file name. And that's why i need to check if line in richtextbox contains "fatal" word and time of exception from file name.

I hope it is clear, if not, i will try to describe it better. Thanks in advance

4

0 回答 0