Read the file in and call Split on each line or use a regular expression to extract what you need. If you know you're going to be extracting data from the log file you might want to use a different pattern:
%H|%d|%c{1}|%5p|%m|%F{1}|%L|%n That way you can split on the pipe character. ----- Original Message ---- From: d s <[EMAIL PROTECTED]> To: log4net-user@logging.apache.org Sent: Wednesday, January 16, 2008 11:24:40 PM Subject: Conversion pattern reverse engine Hi I wonder if anyone can help me with this. I have a log file and the conversion pattern. [%H %d] %c{1} %5p: %m (%F{1}:%L)%n is it possible to extract the log file and get certain field , for example I would like to get "%d" from the log file. If it does, does anyone can give me a bit of example? Thanks, ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --0-700589684-1200542083=:87464 Content-Type: text/html; charset=us-ascii <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi,<br><br>I'm not sure if this is the right forum to post this. <br><br>I have a log file and the conversion pattern. [%H %d] %c{1} %5p: %m (%F{1}:%L)%n<br>is it possible to extract the log file and get certain field , for example I would like to get "%d" from the log file.<br><br>If it does, does anyone can give me a bit of example?<br><br>Thanks,<br></div></div><br> <hr size=1>Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html> --0-700589684-1200542083=:87464-- Never miss a thing. Make Yahoo your homepage. Hi, Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.