logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d s <miss_cool_...@yahoo.com>
Subject Re: Conversion pattern reverse engine
Date Thu, 17 Jan 2008 23:17:33 GMT
Thanks Ron for the advice :)

but my mistake, I must have not explain it clearly.
Is it possible to map the pattern in log4net configuration to the log file?


Cheers,

----- Original Message ----
From: Ron Grabowski <rongrabowski@yahoo.com>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Thursday, January 17, 2008 3:44:59 PM
Subject: Re: Conversion pattern reverse engine


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 <miss_cool_666@yahoo.com>
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.&nbsp; [%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.









      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
Mime
View raw message