Hi Scott,
Here is the saved file from Chainsaw. I am getting g the messages now,
only problem is I am not getting those with the same timestamp together,
thanks
<log4j:event logger="org.apache.log4j.varia.LogFilePatternReceiver"
timestamp="1110263814071" sequenceNumber="497" level="INFO"
thread="Thread-7">
<log4j:message><![CDATA[found non-matching line: 2005-03-08 10:37:13,428
DEBUG - [] com.sns.thb.util.ThubLogger - SqlStatement | selectforupdate
| Query : SELECT * FROM TTHB_TASK_INFO WHERE (STATUS='ON' and
PROCESS_STATE='Scheduled' AND NEXT_RUN_DATE <= to_date('03/08/2005
10:37:13','MM/DD/YYYY HH24:MI:SS')) FOR UPDATE]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="482"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.varia.LogFilePatternReceiver"
timestamp="1110263814071" sequenceNumber="498" level="INFO"
thread="Thread-7">
<log4j:message><![CDATA[found non-matching line: 2005-03-08 10:37:13,437
INFO - [] com.sns.thb.util.ThubLogger - ThubTaskManagerSessionBean |
startAllTasks | '0' records in the TaskInfo table]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="483"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.varia.LogFilePatternReceiver"
timestamp="1110263814071" sequenceNumber="499" level="INFO"
thread="Thread-7">
<log4j:message><![CDATA[found non-matching line: 2005-03-08 10:37:13,439
INFO - [] com.sns.thb.util.ThubLogger - ThubTaskManagerSessionBean |
startAllTasks | Ending]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="484"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.varia.LogFilePatternReceiver"
timestamp="1110263814071" sequenceNumber="500" level="INFO"
thread="Thread-7">
<log4j:message><![CDATA[found non-matching line: 2005-03-08 10:37:13,439
DEBUG - [] com.sns.thb.util.ThubLogger - TaskManager | Ending the
ThubTaskManagerSession Bean Invocation]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="485"/>
</log4j:properties>
</log4j:event>
Best Regards,
Ravi
-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 2:01 PM
To: Log4J Users List
Subject: RE: Regarding Chainsaw
You don't want to use a patternLayout's conversion pattern in the tab
identifier field - for now, change that value to
ALL
You should get a tab called 'unknown' that will receive all events and
display chainsaw internal logging.
You should see messages in the Unknown tab detailing the fact that the
logFilePatternReceiver found the file and was able to process events.
If you don't see entries about LogFilePatternReceiver, the config file
is not being loaded by Chainsaw (you need to set the configuration URL
to the URL of your chainsaw config file).
The default tab identifer:
PROP.hostName - PROP.application
Should work fine to load a log file into a tab.
Scott
-----Original Message-----
From: Ravishankar, Narayanan Nair
[mailto:[EMAIL PROTECTED]
Sent: Mon 3/7/2005 9:52 PM
To: Log4J Users List
Cc:
Subject: RE: Regarding Chainsaw
Hi Scott,
Here are some info, as I am not successful yet, please help, thanks in
advance:
My log4j file:
------------------------------------------------------------------------
------------------------------------------------------------------------
-------
#this is mandatory, DO NOT CHANGE
log4j.categoryFactory=com.sns.base.util.logging.LoggerFactory
log4j.rootCategory=DEBUG
#com.sns.member must be renamed to the package that you are working on
#e.g. com.trade.ita, com.sns.iscm.ifx.ita.common, .....
#A-EPR MUST-BE-CHANGED
#e.g. A-ITA, A-COMMON, ......
log4j.category.com.sns.thb.util=DEBUG, A-THB
#this is mandatory, DO NOT CHANGE
#Edit only A-EPR
log4j.appender.A-THB=org.apache.log4j.RollingFileAppender
log4j.appender.A-THB.layout=org.apache.log4j.PatternLayout
log4j.appender.A-THB.layout.ConversionPattern=%d %-5p -
[%X{CurrentTime}] %c - %m%n
#Edit A-EPR
#the full path MUST-BE-CHANGED
log4j.appender.A-THB.File=/sns/infrastructure/thb/rel2_0/logs/thb.log
#this is mandatory, DO NOT CHANGE
#Edit only A-EPR
#set the maximum size for the log file, after which will be backup
log4j.appender.A-THB.MaxFileSize=3000KB
#if the specified log file is 'epr.log', once the MaxFileSize is reached
#it will be backed up to 'epr.log.1' and so forth till the
MaxBackupIndex
log4j.appender.A-THB.MaxBackupIndex=9
#When your program is going to trial or production, the mode has to be
changed to INFO.
#This is to turn off the Debug messages.
------------------------------------------------------------------------
------------------------------------------------------------------------
-------
My config file for Chainsaw - according to your email last week, we need
a separate config file- I just copied your email and added the logFormat
you had mentioned
------------------------------------------------------------------------
------------------------------------------------------------------------
-------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
<plugin name="LogFileReceiver1"
class="org.apache.log4j.varia.LogFilePatternReceiver">
<param name="fileURL" value="file:///D:/Program Files/Apache
Software Foundation/Tomcat 5.0/bin/MDC.log"/>
<param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/>
<param name="logFormat" value="LEVEL - [PROP(CurrentTime)] LOGGER -
MESSAGE"/>
<param name="name" value="sampleLogFileReceiver1"/>
<param name="tailing" value="true"/>
</plugin>
<root>
<level value="info"/>
</root>
</log4j:configuration>
------------------------------------------------------------------------
------------------------------------------------------------------------
-------
I opened Chainsaw, when I added the same conversion pattern in tab iden
tifier, could not see anything in Cahinsaw. I know some blunders
somewhere, can you please help, thanks a lot in advance, thanks
Best regards,
ravi
-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 1:29 PM
To: Log4J Users List
Subject: RE: Regarding Chainsaw
The 'logFormat' param for a logFilePatternReceiver processsing this log
file would be:
LEVEL - [PROP(CurrentTime)] LOGGER - MESSAGE
It seems that some application-specific identifier (userID, etc) would
be more useful than a timestamp if it's possible.
See the example log4j configuration file (available from Chainsaw's
Welcome tab) for an example receiver config.
Once you have the events in Chainsaw, you can display only events with a
specific 'CurrentTime' property by using this expression in the 'refine
focus' field:
PROP.CurrentTime == '2/8/2005 10:28:13'
Scott
-----Original Message-----
From: Ravishankar, Narayanan Nair
[mailto:[EMAIL PROTECTED]
Sent: Mon 3/7/2005 9:14 PM
To: Log4J Users List
Cc:
Subject: RE: Regarding Chainsaw
Hi Scott,
The logFormat conversion pattern in the log4j propoerties file is
%-5p - [%X{CurrentTime}]%c - %m%n
Thanks and regards,
Ravi
-----Original Message-----
From: Scott Deboy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 11:39 AM
To: Log4J Users List
Subject: RE: Regarding Chainsaw
Glad you like it!
Could you provide your current logFormat param from your
LogFilePatternReceiver configuration?
Here is my guess at what your logFormat is:
TIMESTAMP LEVEL - [PROP(SOMEPROPNAME)] LOGGER - MESSAGE
(I'm not sure if the last part are (separated by | ) are properties or
just the log event message.
SOMEPROPNAME is what I'm calling the property (MDC entry) you're
interested in seeing uniquely.
You have two options:
----------------------------------
Use the logger tree:
The logger tree would be a natural way to display these unique entries.
To use the MDC entry in the logger tree, change your logFormat to this:
TIMESTAMP LEVEL - [LOGGER] PROP(REAL_LOGGER) - MESSAGE
While normally a class name is the logger, there's nothing preventing
you from changing which field is the 'logger' (which field ends up in
the logger tree). You'll still get logger information displayed in the
REAL_LOGGER column.
The logger tree won't be a tree, but you can select the 'focus on'
logger tree option and select a specific entry to view only events for
that MDC entry.
----------------------------------
Each unique MDC entry on a tab:
Alternatively, you can show each unique MDC entry on its own tab
(probably a lot of tabs if you're using a timestamp), by changing the
'tab identifier' field in the application-wide preferences menu to this:
PROP.SOMEPROPNAME
Now, events are routed to tabs based on the SOMEPROPNAME property (MDC
entry).
----------------------------------
I hope that helps - if you have more questions, let us know.
Scott
-----Original Message-----
From: Ravishankar, Narayanan Nair
[mailto:[EMAIL PROTECTED]
Sent: Mon 3/7/2005 6:56 PM
To: Log4J Users List
Cc:
Subject: Regarding Chainsaw
Hi all,
I have used Chainsaw successfully. My logs are coming as:
2005-03-08 10:28:29,291 DEBUG - [2/8/2005 10:28:13]
comtech.sps.thb.util.ThubLogger - EventHandlerAdapter |
produceToEventHandler | The Status after the event publish : true |
UniqueCodeNo : THBUN1110248909078628
As you can see the value - [2/8/2005 10:28:13] is printed because I am
putting the timestamp into MDC.
One clarification please, when concurrent request are coming in, the
timestamps will be different of course. How can I view in Chainsaw as
separate threads with all same timestamps together ? What expression
should I use? Please help and advise, thanks a lot.
I love Chainsaw and going to propose for the whole company to adopt :-)
Best regards,
Ravi
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]