In article <ey**************@TK2MSFTNGP10.phx.gbl>,
Br***********@wvmb.com says...
Yeah, they will span multiple lines. Here is an example.
01/26/04 10:53:02 Importing file d:\Program
Files\x\x\PollDir\992FERGUSON,S.fnm.
01/26/04 10:53:09 Application '992FERGUSON,S ' already exists. This
application will not be imported.
01/26/04 10:53:09 Application '992FERGUSON,S ' failed to import.
You'll need something that can break the log out into manageable pieces.
Nothing in the sample you showed above indicates how you would know the
end of a multiline entry (for example, the last entry isn't even
multiline).
Do you have control of the log file format? If so, you might want to
include some delimiter line that indicates the end of a log entry (like
"*************************"). Then you could use Herfried's sample code
that reads a line at a time. Build up a string until you hit a
"*************************" line, and then can the entry using
String.SubString() to look for errors.
--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele