The receiver needs reliable delimiters to separate text into fields. 

Your two example log lines contain:
Logger: AE - getSectionOperationOptByAEPath DTC: given
Logger: LOOKUP - LU convertResultSetToXferApptRequest for
request 66  

Note the LU after the logger name and before the method name in the 2nd
line - I expected the field between that dash and the following space to
be the method, but that's not the case for the 2nd line...

The best you can do when you have inconsistent formatting in your log is
to store the inconsistent part in the MESSAGE field and use Chainsaw's
built in search/filter functions to find the content.. 

Your log file contains the same date/time entry twice, so I've ignored
the 1st entry (since it doesn't contain the year) - also, the 2nd
date/time field happens to be in the default timestamp format used by
the receiver (I've also ignored the 2nd logger name).

Since I can't reliably separate the method field (because of the space
delimiting and the extra LU field on the 2nd example entry), the method
name will be the 1st text displayed in the MESSAGE field.

(1st 3 stars ignore the 1st 3 fields - redundant date/time info)
(4th star ignores the redundant logger)

(I don't know what property1 or property2 are, so they'll show up as a
column with that name in Chainsaw)

Log format:

* * * PROP(PROPERTY1) TIMESTAMP LEVEL * - Deployed: PROP(PROPERTY2) -
Logger: LOGGER - MESSAGE



Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
[EMAIL PROTECTED]
www.comotivsystems.com


-----Original Message-----
From: Siegel, Bernard J. [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 25, 2007 9:08 AM
To: log4j-user@logging.apache.org
Subject: Chainsaw logFormat

Folks,
I have Chainsaw sort of working using a log4j written text log.
But the logFormat is not correct.
What are the possible values for this (logFormat)?

A co-worker thinks the pattern is: (2 sample lines below)
DateTime Hostname DateTime Severity Logger Server Logger Method Message 
How would I write that for the logFormat?
Thanks,

Info:  (log4j.xml file)
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";
debug="true">
<plugin name="RSA LOG FILE"
class="org.apache.log4j.varia.LogFilePatternReceiver">
    <param name="timestampFormat" value="MMM dd HH:mm:ss"/>
    <param name="logFormat" value="TIMESTAMP LEVEL CLASS MESSAGE"/>
    <param name="fileURL" value="file:///C:/junk/rsa.log"/>
    <param name="tailing" value="true"/>
</plugin >
<root><level value="debug"/></root>
</log4j:configuration>

Two sample lines from the log:
Aug 28 15:09:49 vhaisprsa4 2007-08-28 15:09:49,566 WARN  ae - Deployed:
rsaRsa4Srv1 - Logger: AE - getSectionOperationOptByAEPath DTC: given AE
was not a schedulable entity 
Aug 28 15:09:52 vhaisprsa4 2007-08-28 15:09:52,595 ERROR lu - Deployed:
rsaRsa4Srv1 - Logger: LOOKUP - LU convertResultSetToXferApptRequest for
request 66  java.lang.NegativeArraySizeException 


Bernard Siegel
Senior Research Analyst
Mobile Systems Technology Group
Presentation Systems Section
Software Design and Development Department
Medical Systems Organization
Software Engineering
Division 10, Automation and Data Systems
Southwest Research Institute
Desk Phone:  (210) 522-2347
Cell Phone: (210) 387-6437
Fax Phone: (210) 522-4228

"They placed me on this earth without a manual. 
 And I dare to say, I'm doing just fine without ;)" 

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


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

Reply via email to