logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Conversion pattern reverse engine
Date Fri, 18 Jan 2008 22:09:32 GMT

On Jan 17, 2008, at 11:07 PM, Ron Grabowski wrote:
> ----- 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,

In the log4j receivers companion (http://logging.apache.org/log4j/companions/receivers 
), there is org.apache.log4j.varia.LogFilePatternReceiver that  
processes a log file and generates corresponding logging events.   
Chainsaw uses this "receiver" to read an arbitrary log file.  There  
are similar receivers for XML files, etc.  It is written in Java, but  
it should be able to operate on log4net generated files.  I'd not the  
one to ask for specific questions about Chainsaw or the receiver, but  
if you have questions, you could ask on log4j-user.

View raw message