logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Conversion pattern reverse engine
Date Fri, 18 Jan 2008 05:07:01 GMT
I don't understand what you want. Could you give a better example. Do you want to use a pattern
as part of the file name:

 <file value="%date.log" />

so you'll get a file named 2008-01-18.log?

----- Original Message ----
From: d s <miss_cool_666@yahoo.com>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Thursday, January 17, 2008 6:17:33 PM
Subject: Re: Conversion pattern reverse engine

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,














Mime
View raw message