Hi,

I am also new to using Chainsaw, infact I studied it yesterday and using it to 
view my log file.

What I guess is that you have given the logFormat information in a wrong way. 
You are supposed to write the logFormat in KEYWORDS and not as you have written 
in your properties file. In other words the format you have specifed in 
properties file need to converted into KEYWORDS and then should be specified in 
logFormat.

OR in LogFilePatternReceiver javadoc (In Chainsaw goto Help->Receiver 
Javadoc->LogFilePatternReceiver) this is mentioned as "specify the pattern 
(logFormat) used in the log file using keywords, a wildcard character (*) and 
fixed text ".

I have created a LogReceiver for your file and succesfully opened it in 
Chainsaw. I have used following properties for creating the LogReceiver

fileURL : file:///C:/temp/Chainsaw/exemple5.log
filterExpression : 
logFormat : TIMESTAMP LEVEL CLASS - FILE:LINE - MESSAGE
name :  whatever
tailing : true
timestampFormat : by default

Regards,
Jitendra



________________________________

From: Jean-Marie Hénaff [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 03, 2005 6:54 PM
To: log4j-user@logging.apache.org
Subject: chainsaw-LogFilePatternReceiver


Hi,
I am new to Log4J and chainsaw, and there is something I can't make work. 
I managed to make my logger use the console appender, the log file appender, 
and the xml appender. I can visualize my XML file with chainsaw, but I would 
like to use a LogFilePatternReceiver, so I won't have to open my file every 
time it changes. (If I get this right)
To do that I create a new LogFilePatternReceiver, and I fill the form as 
follows:

fileURL : file:/foo/bar/exemple5.log <file:/foo/bar/myFile.log>      //<-- 
created with a FileAppender
filterExpression : LEVEL >= INFO
logFormat :    %d %-5p %c - %F:%-4L - %m%n // <-- cut'n pasted from the 
properties file, the pattern I used for the FileAppender
name :  whatever
tailing : true
timestampFormat : by default

and chainsaw seems to find my files because the messages I get from it are like
>>found non-matching line: 2005-02-02 11:48:59,453 WARN  org.progx - 
>>exemple5.java: 19  - Exiting application
where the non matching line belongs to myFile.log. I don't understand this 
message : does this mean that he can't parse my log file according to the 
Pattern I gave? In this case there would be a problem, because the Pattern is 
the same I used to write my log file (I cut'n pasted it from the properties 
file). (Ah, I forgot to tell that I also gave my properties file to chainsaw 
when I launched it)

Anybody can help me? (is it supposed to look as if I opened my xml file from 
the File menu, as I expect? )
Thanks.

(I attached my files )




 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to