I solved this problem.   It appears that chainsaw is expecting logger in place of 
category in the XMLLayout output file.   By modifying XMLFileHandler like so, I was 
able to get it to work correctly.  

@@ -115,6 +115,9 @@
             mThreadName = aAtts.getValue("thread");
             mTimeStamp = Long.parseLong(aAtts.getValue("timestamp"));
             mCategoryName = aAtts.getValue("logger");
+            if (mCategoryName == null) {
+                mCategoryName = aAtts.getValue("category");
+            }
             mPriority = Priority.toPriority(aAtts.getValue("level"));
         } else if (TAG_LOCATION_INFO.equals(aQName)) {
             mLocationDetails = aAtts.getValue("class") + "."


We're still using category instead of logger in our code, even though it's deprecated 
(there are a fair number of areas to be changed.  Should Chainsaw be modified to work 
both ways? )  



> -----Original Message-----
> From: Beleznay, Dave 
> Sent: Monday, February 03, 2003 10:09 PM
> To: [EMAIL PROTECTED]
> Subject: chainsaw not reading XMLLayout log file
> 
> 
> When I try to load up the following logfile with chainsaw I 
> keep getting null pointer exceptions..
> 
> <log4j:event 
> category="com.webct.platform.framework.ejb.JMSBase" 
> timestamp="1044335246660" level="ERROR" thread="Thread-7"> 
> <log4j:message><![CDATA[CLASS: 
> com.webct.platform.framework.ejb.JMSBase METHOD: tryConnecting
> Successfully connected after try #0]]></log4j:message> 
> </log4j:event>  
> <log4j:event 
> category="com.webct.platform.tools.help.startup.HelpStartup" 
> timestamp="1044335248707" level="ERROR" thread="Thread-12"> 
> <log4j:message><![CDATA[CLASS: 
> com.webct.platform.tools.help.startup.HelpStartup METHOD: 
> registerAllLocaleHelpFiles
> Couldn't get setting from sms for 
> product/locale]]></log4j:message> </log4j:event>  
> <log4j:event 
> category="com.webct.platform.framework.ifscontext.ContextMgr" 
> timestamp="1044335279285" level="ERROR" 
> thread="ExecuteThread: '24' for queue: 
> 'PrimaryExecuteQueue'"> <log4j:message><![CDATA[CLASS: 
> com.webct.platform.framework.ifscontext.ContextMgr METHOD: 
> SessionHolder Default Constructor
> Created Session Holder 
> DaveBeleznay-1044335279285-1]]></log4j:message> </log4j:event>
> 
> The exception is as follows:
> 
> E:\development\jakarta-log4j-1.2.7\dist\lib>java -cp 
> log4j-1.2.7.jar;..\..\..\xe
> rces-1_4_4\xerces.jar org.apache.log4j.chainsaw.Main
> [main] DEBUG org.apache.log4j.chainsaw.MyTableModel - Total 
> time [ms]: 0 in update, size: 0
> [Thread-3] INFO org.apache.log4j.chainsaw.LoggingReceiver - 
> Thread started
> [Thread-3] DEBUG org.apache.log4j.chainsaw.LoggingReceiver - 
> Waiting for a connection
> [AWT-EventQueue-0] INFO 
> org.apache.log4j.chainsaw.LoadXMLAction - load file called
> [AWT-EventQueue-0] INFO 
> org.apache.log4j.chainsaw.LoadXMLAction - Need to load a file
> [AWT-EventQueue-0] INFO 
> org.apache.log4j.chainsaw.LoadXMLAction - loading the 
> contents of C:\smallwebct.log
> java.lang.NullPointerException
>         at 
> org.apache.log4j.chainsaw.MyTableModel.matchFilter(MyTableModel.java:
> 363)
>         at 
> org.apache.log4j.chainsaw.MyTableModel.access$400(MyTableModel.java:2
> 7)
>         at 
> org.apache.log4j.chainsaw.MyTableModel$Processor.run(MyTableModel.jav
> a:88)
>         at java.lang.Thread.run(Unknown Source)
> 
> Am I doing something wrong?  the application that is making 
> the logfile is using log4j version 1.2.7 and I'm trying to 
> use xerces 1.4.4 to parse the file. 
> 
> any help would be appreciated.
> 
> Cheers,
> 
> Dave
> 
> --
> David Beleznay
> Software Engineer
> WebCT
> 
> ---------------------------------------------------------------------
> 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