How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn

Hi,
I am playing around with chainsaw and it does not look
like it
recognizes my log file.
I understand that chainsaw expects XMLLayout
compatible output file for
it to be able to parse it.
How do you do that?
Thanks a lot.
Robert
Btw: I am using version which comes with ver 1.2.8 of
log4j.


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 11:42, Robert Augustyn wrote:
 Hi,
 I am playing around with chainsaw and it does not look
 like it
 recognizes my log file.
 I understand that chainsaw expects XMLLayout
 compatible output file for
 it to be able to parse it.
 How do you do that?
 Thanks a lot.
 Robert
 Btw: I am using version which comes with ver 1.2.8 of
 log4j.

Hi Robert,

Do you have an appender configured that outputs using the XMLLayout
layout class?  That's the first step.  If so, is Chainsaw throwing an
error?  We'll need a few more details to help you. 

cheers,

Paul Smith


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



RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn
Paul,
Thanks for quick response.
No I have no appender configured using XMLLayout.
Where can I find an example? I have looked through the
distribution and
could find nothing.
Chainsaw does not throw an error it says 0 loaded
events when opening
the file.
Thanks a lot.
robert

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 7:51 PM
To: Log4J Users List
Subject: Re: How to configure log4j to generate
XMLLayout compatible
output.


On Fri, 2003-11-28 at 11:42, Robert Augustyn wrote:

 Hi,

 I am playing around with chainsaw and it does not
look

 like it

 recognizes my log file.

 I understand that chainsaw expects XMLLayout

 compatible output file for

 it to be able to parse it.

 How do you do that?

 Thanks a lot.

 Robert

 Btw: I am using version which comes with ver 1.2.8
of

 log4j.



Hi Robert,



Do you have an appender configured that outputs using
the XMLLayout

layout class?  That's the first step.  If so, is
Chainsaw throwing an

error?  We'll need a few more details to help you. 



cheers,



Paul Smith





-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

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



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Paul Smith
 No I have no appender configured using XMLLayout.
 Where can I find an example? I have looked through the
 distribution and
 could find nothing.
 Chainsaw does not throw an error it says 0 loaded
 events when opening
 the file.
 Thanks a lot.
 robert

It's pretty easy, here's a snippet from a log4j.properties file:

log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.xml.XMLLayout
log4j.appender.A1.append=true
log4j.appender.A1.file=/somepathonyoursystem/log.xml

You may want to browse the Wiki:
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/FrequentlyAskedQuestions

In case configuring Log4j via property files is new, you may find this
URL useful:

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#doConfigure(java.lang.String,
 org.apache.log4j.spi.LoggerRepository)

cheers,

Paul Smith

On Fri, 2003-11-28 at 12:25, Robert Augustyn wrote:



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



RE: How to configure log4j to generate XMLLayout compatible output.

2003-11-27 Thread Robert Augustyn
Paul,
Thanks this worked great.
Robert


-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 8:41 PM
To: Log4J Users List
Subject: RE: How to configure log4j to generate
XMLLayout compatible
output.


 No I have no appender configured using XMLLayout.

 Where can I find an example? I have looked through
the

 distribution and

 could find nothing.

 Chainsaw does not throw an error it says 0 loaded

 events when opening

 the file.

 Thanks a lot.

 robert



It's pretty easy, here's a snippet from a
log4j.properties file:



log4j.rootLogger=DEBUG, A1

log4j.appender.A1=org.apache.log4j.FileAppender

log4j.appender.A1.layout=org.apache.log4j.xml.XMLLayout

log4j.appender.A1.append=true

log4j.appender.A1.file=/somepathonyoursystem/log.xml



You may want to browse the Wiki:

http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/Frequentl
yAskedQuestions



In case configuring Log4j via property files is new,
you may find this

URL useful:



http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfig
urator.html#doConfigure(java.lang.String,
org.apache.log4j.spi.LoggerRepository)



cheers,



Paul Smith



On Fri, 2003-11-28 at 12:25, Robert Augustyn wrote:







-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

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



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Newbie/Dummy Question on XMLLayout and log4j

2003-11-19 Thread Caitriona Doris (AT/EEI)
Hi,

I am trying to use XMLLayout class to format my logs from log4j and my question is in 
the complete manual it states that 
 ... if abc.log is the name of the file where the XMLLayout results go, then the 
following file includes it as an external entity:

Is this a dtd that should be used instead of lo4j.dtd? If so where do I tell my 
application that it should look at this dtd instead of log4j.dtd.

Also, I need to output some parameter from the classes that call the logger can I do 
this without rendering the objects that hold those parameters?

Thanks,
Caitriona

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



XMLLayout and styleheet

2003-08-18 Thread Morten Haavaldsen
Hi,

has anyone tested the XMLLayout and have some stylesheets.


/Morten





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



XMLLayout and HTMLLayout !!!

2003-06-05 Thread Padmaja Manike
Hi 

Can anyone tell me  which appender is best suited for HTMLLayout and XMLLayout.
Can we have a HTML or XMLLayout for a RollingFileAppender?
If yes then how should the xml configuration file look like?

Thanks in advance.

Padmaja Manike
Programmer Analyst
Intelligroup Asia Pvt. Ltd. 
3- 9- 22, Mana Sarovar Complex, Secretariat Road,
Hyderabad, AndhraPradesh, 500063
Tel: 23297487/88 extn: 3054



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



RE: chainsaw not reading XMLLayout log file

2003-02-06 Thread Beleznay, Dave
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\libjava -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]




chainsaw not reading XMLLayout log file

2003-02-03 Thread Beleznay, Dave
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\libjava -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]




XMLLayout/Chainsaw

2002-11-11 Thread Graham Mead
Hi,

I'm trying to open a log file via Chainsaw which has been written to via
the XMLLayout Appender
As per the Javadoc, I have created an xml file with the following entries

?xml version=1.0 ?
!DOCTYPE log4j:eventSet SYSTEM log4j.dtd [!ENTITY data SYSTEM server.log]
log4j:eventSet version=1.2 xmlns:log4j=http://jakarta.apache.org/log4j/;
  data;
/log4j:eventSet

If I attempt to open this with Chainsaw I get a Error parsing file - null message 
dialog.

If I use IE5 I get

Reference to undeclared namespace prefix: 'log4j'. Line 4, Position 1

log4j:eventSet xmlns:log4j=http://jakarta.apache.org/log4;
^

and a blank screen with Netscape 7.0

If I copy the contents of server.log between the log4j:eventSet tags and remove the 
SYSTEM entry

I can get Netscape 7.0 to resolve this quite happily but not IE5 or Chainsaw.

I am using xerces 1.4.3  as an XML parser in conjunction with Chainsaw

I have seen an archived entry  
http://www.geocrawler.com/archives/3/8359/2002/5/300/8565707/
where it mentions that pasting the log file contents in, works with IE6.

I'm not totally sure that my Chainsaw problem is connected but it appears highly 
likely. Can anyone shed some light on what is happening?

TIA Graham






--
To unsubscribe, e-mail:   mailto:log4j-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:log4j-user-help;jakarta.apache.org




XMLLayout

2002-10-01 Thread Sundararaman, Anand

Hi,
 I have a problem in my XMLayout.  The log file which is formed does
not have a main tag. So it does not open in the internet explorer.  

Can anyone help me out on how to include the main tag?

I am attaching the relevant files I am using.


Thanks in advance
Anand




 BEMISXMLLayout.java  BEMISLog.xml  ClientLogger.java 
WARNING: The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee.  Access to this message
by anyone else is unauthorised.  If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message in
error. Thank you.



BEMISXMLLayout.java
Description: Binary data


BEMISLog.xml
Description: Binary data


ClientLogger.java
Description: Binary data

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


AW: Bug in XMLLayout

2002-08-20 Thread Holger Brands

Hi,

 
 The issue i am facing is that the log4j.dtd defines the event as 
 follows:
 
 !ATTLIST log4j:event
 category CDATA #REQUIRED
 priority CDATA #REQUIRED
 thread CDATA #REQUIRED
 timestamp CDATA #REQUIRED
 
 
 Note that the dtd uses priority while the XMLLayout 
 uses level(for severity levels like DEBUG, WARN etc). How can i fix 
 it? 

What log4j version do you use ?

I think this has been fixed in a recent 
log4j version ( = 1.2.4).
Now it uses level and logger consistently.

Hope this helps,
Holger


Holger Brands
eurodata GmbH  Co. KG


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




Bug in XMLLayout

2002-08-19 Thread sanjayrajsoni

When i use the 
XMLLayout as shown below:

log4j.appender.R.layout=org.apache.log4j.xml.XMLLayout

It generates the following message:
log4j:event category=plat.ivss.sloc timestamp=1029016634611 
level=WARN thread=main
log4j:message![CDATA[WARN]]/log4j:message
/log4j:event

The issue i am facing is that the log4j.dtd defines the event as 
follows:

!ATTLIST log4j:event
category CDATA #REQUIRED
priority CDATA #REQUIRED
thread CDATA #REQUIRED
timestamp CDATA #REQUIRED


Note that the dtd uses priority while the XMLLayout 
uses level(for severity levels like DEBUG, WARN etc). How can i fix 
it? I looked up the code for XMLLayout i has the following lines of 
code:
buf.append(log4j:event category=\);
buf.append(event.categoryName);
buf.append(\ timestamp=\);
buf.append(event.timeStamp);
buf.append(\ level=\);
buf.append(event.level);

Since level is hardcoded in the Java file i am assuming there is no 
way to configure this.



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




Incompatibility between Log4j DTD and XMLLayout

2002-08-14 Thread sanjayrajsoni



I downloaded jakarta-log4j-1.2.1 sometime in May'02. When i use the 
XMLLayout as shown below:

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.file=MyApp.log
log4j.appender.R.MaxFileSize=1
log4j.appender.R.layout=org.apache.log4j.xml.XMLLayout

It generates the following message:
log4j:event category=plat.ivss.sloc timestamp=1029016634611 
level=WARN thread=main
log4j:message![CDATA[WARN]]/log4j:message
/log4j:event

The issue i am facing is that the log4j.dtd defines the event as 
follows:

!ATTLIST log4j:event
category   CDATA #REQUIRED
priority   CDATA #REQUIRED
thread CDATA #REQUIRED
timestamp  CDATA #REQUIRED


Note that the dtd uses priority while the XMLLayout 
uses level(for severity levels like DEBUG, WARN etc). How can i fix 
it? I looked up the code for XMLLayout i has the following lines of 
code:
buf.append(log4j:event category=\);
buf.append(event.categoryName);
buf.append(\ timestamp=\);
buf.append(event.timeStamp);
buf.append(\ level=\);
buf.append(event.level);

Since level is hardcoded in the Java file i am assuming there is no 
way to configure this.

Should use an edited log4j DTD or should i use my own class? 




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




XMLLayout Chainsaw

2002-08-12 Thread Chris Hane


Hopefully this is a quick question.  I'm trying to get Chainsaw to read a 
file created with XMLLayout.  I've read the XMLLayout javadoc and have not 
been able to figure out exactly what I need to do to modify the output so 
that chainsaw will read the file in.  I will admit that I am not an XML expert.

If I have the following in a file called log.xml what do I need to add 
around it in order that I can open the file in chainsaw.  Also, I'm using 
the latest version of log4j 1.2.6.

log4j:event logger=com.test timestamp=1029135031807 level=DEBUG 
thread=main
log4j:message![CDATA[Create new test]]/log4j:message
log4j:NDC![CDATA[I am test 1]]/log4j:NDC
/log4j:event

I've tried different variations of the !DOCTYPE syntax in the XMLLayout 
javadoc but seem to be missing something.  For all of the files I try to 
read I get a dialog box poping up in chainsaw saying  error parsing file - 
null.  The expection message thrown is:

[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:\Data\CVSHOME\itsolut\dist\log.xml
[AWT-EventQueue-0] WARN org.apache.log4j.chainsaw.LoadXMLAction - caught an 
exception loading the file
java.lang.NullPointerException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:925)
 at 
org.apache.log4j.chainsaw.LoadXMLAction.loadFile(LoadXMLAction.java:126)
 at 
org.apache.log4j.chainsaw.LoadXMLAction.actionPerformed(LoadXMLAction.java:84)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at 
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
snip/


Thanks in advance,
Chris


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




Re: XMLLayout Chainsaw

2002-08-12 Thread Chris Hane


Figures that I would get it working after asking for help.  Turns out it 
was the version of the xml parser.  While chainsaw will startup with 
xerces-1.x it will not parse the file.  I tried the XercesJ-2.x (the latest 
one) and could not get it to work.  I did get it to work with the crimson 
parser - at least the one bundled with tomcat 4.0

Question, should it work with Xerces 2.x?

Thanks,
Chris


At 8/12/2002 02:55 AM, you wrote:

Hopefully this is a quick question.  I'm trying to get Chainsaw to read a 
file created with XMLLayout.  I've read the XMLLayout javadoc and have not 
been able to figure out exactly what I need to do to modify the output so 
that chainsaw will read the file in.  I will admit that I am not an XML expert.

If I have the following in a file called log.xml what do I need to add 
around it in order that I can open the file in chainsaw.  Also, I'm using 
the latest version of log4j 1.2.6.

log4j:event logger=com.test timestamp=1029135031807 level=DEBUG 
thread=main
log4j:message![CDATA[Create new test]]/log4j:message
log4j:NDC![CDATA[I am test 1]]/log4j:NDC
/log4j:event

I've tried different variations of the !DOCTYPE syntax in the XMLLayout 
javadoc but seem to be missing something.  For all of the files I try to 
read I get a dialog box poping up in chainsaw saying  error parsing file 
- null.  The expection message thrown is:

[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:\Data\CVSHOME\itsolut\dist\log.xml
[AWT-EventQueue-0] WARN org.apache.log4j.chainsaw.LoadXMLAction - caught 
an exception loading the file
java.lang.NullPointerException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:925)
 at 
 org.apache.log4j.chainsaw.LoadXMLAction.loadFile(LoadXMLAction.java:126)
 at 
 org.apache.log4j.chainsaw.LoadXMLAction.actionPerformed(LoadXMLAction.java:84)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at 
 javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
snip/


Thanks in advance,
Chris


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




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




RE: XMLLayout Chainsaw

2002-08-12 Thread Christian, William

I had the very same trouble. The answered I received on the same question
was that it should work with any JAXP compliant parser. However, I have not
been able to get it to parse correctly using anything other than Crimson.


-Original Message-
From: Chris Hane [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 4:39 AM
To: Log4J Users List
Subject: Re: XMLLayout  Chainsaw


Figures that I would get it working after asking for help.  Turns out it
was the version of the xml parser.  While chainsaw will startup with
xerces-1.x it will not parse the file.  I tried the XercesJ-2.x (the latest
one) and could not get it to work.  I did get it to work with the crimson
parser - at least the one bundled with tomcat 4.0

Question, should it work with Xerces 2.x?

Thanks,
Chris


At 8/12/2002 02:55 AM, you wrote:

Hopefully this is a quick question.  I'm trying to get Chainsaw to read a
file created with XMLLayout.  I've read the XMLLayout javadoc and have not
been able to figure out exactly what I need to do to modify the output so
that chainsaw will read the file in.  I will admit that I am not an XML
expert.

If I have the following in a file called log.xml what do I need to add
around it in order that I can open the file in chainsaw.  Also, I'm using
the latest version of log4j 1.2.6.

log4j:event logger=com.test timestamp=1029135031807 level=DEBUG
thread=main
log4j:message![CDATA[Create new test]]/log4j:message
log4j:NDC![CDATA[I am test 1]]/log4j:NDC
/log4j:event

I've tried different variations of the !DOCTYPE syntax in the XMLLayout
javadoc but seem to be missing something.  For all of the files I try to
read I get a dialog box poping up in chainsaw saying  error parsing file
- null.  The expection message thrown is:

[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:\Data\CVSHOME\itsolut\dist\log.xml
[AWT-EventQueue-0] WARN org.apache.log4j.chainsaw.LoadXMLAction - caught
an exception loading the file
java.lang.NullPointerException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:925)
 at
 org.apache.log4j.chainsaw.LoadXMLAction.loadFile(LoadXMLAction.java:126)
 at

org.apache.log4j.chainsaw.LoadXMLAction.actionPerformed(LoadXMLAction.java:8
4)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at
 javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
snip/


Thanks in advance,
Chris


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




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

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




RE: Correction!! (was: RE: XMLLayout conversion pattern)

2002-07-02 Thread Thomas Muller

Never used XMLLayout, but it can't be rocket science:

appender name=FOO class=org.apache.log4j.FileAppender
param name=file value=foo.log /
layout class=org.apache.log4j.xml.XMLLayout
param name=LocationInfo value=true /
/layout
/appender

category name=foo
appender-ref ref=FOO/
/category

NB! Not tested!

--

Thomas


 | -Original Message-
 | From: Christian, William [mailto:[EMAIL PROTECTED]]
 | Sent: 01 July 2002 21:17
 | To: 'Log4J Users List'
 | Subject: RE: Correction!! (was: RE: XMLLayout conversion pattern)
 |
 |
 | Do you have an example you can share? Thanks.
 | -billc
 |
 | -Original Message-
 | From: Thomas Muller [mailto:[EMAIL PROTECTED]]
 | Sent: Monday, July 01, 2002 2:01 PM
 | To: Log4J Users List
 | Subject: Correction!! (was: RE: XMLLayout conversion pattern)
 |
 | Perusing the code you can see that you will have to set LocationInfo *for
 | the actual Layout* in order to get class/method/line
 | information. If you're
 | using SMTPAppender you're adviced to set LocationInfo for the appender as
 | well.
 |
 | --
 |
 | Thomas
 |
 |
 |  | -Original Message-
 |  | From: Thomas Muller [mailto:[EMAIL PROTECTED]]
 |  | Sent: 01 July 2002 18:45
 |  | To: Log4J Users List
 |  | Subject: RE: XMLLayout conversion pattern
 |  |
 |  |
 |  | Try to set
 |  |
 |  |  param name=LocationInfo value=true /
 |  |
 |  | for the appender you're using.
 |  |
 |  | --
 |  |
 |  | Thomas
 |  |
 |  |
 |  |
 |  |
 |  |  | -Original Message-
 |  |  | From: Christian, William [mailto:[EMAIL PROTECTED]]
 |  |  | Sent: 01 July 2002 18:26
 |  |  | To: Log4J Users List
 |  |  | Subject: XMLLayout conversion pattern
 |  |  |
 |  |  |
 |  |  | How do I customize the XML log event produced when using
 | the XMLLayout
 |  |  | appender? I would like to include additional data as is
 |  |  | currently done with
 |  |  | the ConversionPattern. However, the ConversionPattern is not
 |  | supported by
 |  |  | the XMLLayout appender. Specifically, I want to output the
 |  |  | calling class (%C
 |  |  | in the ConversionPattern).
 |  |  |
 |  |  | Thanks,
 |  |  | -billc
 |  |  |
 |  |
 |  |
 |  |
 |  |
 | *
 |  | Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
 |  | reserved.
 |  | The information supplied in this email should be treated in
 | confidence.
 |  | No liability whatsoever is accepted for any loss or damage
 |  | suffered as a result of accessing this message or any attachments.
 |  |
 |  |
 | 
 |  | This email has been scanned for all viruses by the MessageLabs SkyScan
 |  | service. For more information on a proactive anti-virus
 | service working
 |  | around the clock, around the globe, visit http://www.messagelabs.com
 |  |
 | 
 |  |
 |  | --
 |  | To unsubscribe, e-mail:
 | mailto:[EMAIL PROTECTED]
 | For additional commands, e-mail:
 | mailto:[EMAIL PROTECTED]
 |
 |
 |
 |
 | *
 | Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved.
 | The information supplied in this email should be treated in confidence.
 | No liability whatsoever is accepted for any loss or damage
 | suffered as a result of accessing this message or any attachments.
 |
 | 
 | This email has been scanned for all viruses by the MessageLabs SkyScan
 | service. For more information on a proactive anti-virus service working
 | around the clock, around the globe, visit http://www.messagelabs.com
 | 
 |
 | --
 | To unsubscribe, e-mail:
 | mailto:[EMAIL PROTECTED]
 | For additional commands, e-mail:
 | mailto:[EMAIL PROTECTED]
 |
 | --
 | To unsubscribe, e-mail:
 | mailto:[EMAIL PROTECTED]
 | For additional commands, e-mail:
 | mailto:[EMAIL PROTECTED]
 |
 |



*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


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




XMLLayout conversion pattern

2002-07-01 Thread Christian, William

How do I customize the XML log event produced when using the XMLLayout
appender? I would like to include additional data as is currently done with
the ConversionPattern. However, the ConversionPattern is not supported by
the XMLLayout appender. Specifically, I want to output the calling class (%C
in the ConversionPattern). 
 
Thanks,
-billc



RE: XMLLayout conversion pattern

2002-07-01 Thread Thomas Muller

Try to set

param name=LocationInfo value=true /

for the appender you're using.

--

Thomas




 | -Original Message-
 | From: Christian, William [mailto:[EMAIL PROTECTED]]
 | Sent: 01 July 2002 18:26
 | To: Log4J Users List
 | Subject: XMLLayout conversion pattern
 |
 |
 | How do I customize the XML log event produced when using the XMLLayout
 | appender? I would like to include additional data as is
 | currently done with
 | the ConversionPattern. However, the ConversionPattern is not supported by
 | the XMLLayout appender. Specifically, I want to output the
 | calling class (%C
 | in the ConversionPattern).
 |
 | Thanks,
 | -billc
 |



*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


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




Correction!! (was: RE: XMLLayout conversion pattern)

2002-07-01 Thread Thomas Muller

Perusing the code you can see that you will have to set LocationInfo *for
the actual Layout* in order to get class/method/line information. If you're
using SMTPAppender you're adviced to set LocationInfo for the appender as
well.

--

Thomas


 | -Original Message-
 | From: Thomas Muller [mailto:[EMAIL PROTECTED]]
 | Sent: 01 July 2002 18:45
 | To: Log4J Users List
 | Subject: RE: XMLLayout conversion pattern
 |
 |
 | Try to set
 |
 |  param name=LocationInfo value=true /
 |
 | for the appender you're using.
 |
 | --
 |
 | Thomas
 |
 |
 |
 |
 |  | -Original Message-
 |  | From: Christian, William [mailto:[EMAIL PROTECTED]]
 |  | Sent: 01 July 2002 18:26
 |  | To: Log4J Users List
 |  | Subject: XMLLayout conversion pattern
 |  |
 |  |
 |  | How do I customize the XML log event produced when using the XMLLayout
 |  | appender? I would like to include additional data as is
 |  | currently done with
 |  | the ConversionPattern. However, the ConversionPattern is not
 | supported by
 |  | the XMLLayout appender. Specifically, I want to output the
 |  | calling class (%C
 |  | in the ConversionPattern).
 |  |
 |  | Thanks,
 |  | -billc
 |  |
 |
 |
 |
 | *
 | Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
 | reserved.
 | The information supplied in this email should be treated in confidence.
 | No liability whatsoever is accepted for any loss or damage
 | suffered as a result of accessing this message or any attachments.
 |
 | 
 | This email has been scanned for all viruses by the MessageLabs SkyScan
 | service. For more information on a proactive anti-virus service working
 | around the clock, around the globe, visit http://www.messagelabs.com
 | 
 |
 | --
 | To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


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




RE: Correction!! (was: RE: XMLLayout conversion pattern)

2002-07-01 Thread Christian, William

Do you have an example you can share? Thanks.
-billc

-Original Message-
From: Thomas Muller [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 2:01 PM
To: Log4J Users List
Subject: Correction!! (was: RE: XMLLayout conversion pattern)

Perusing the code you can see that you will have to set LocationInfo *for
the actual Layout* in order to get class/method/line information. If you're
using SMTPAppender you're adviced to set LocationInfo for the appender as
well.

--

Thomas


 | -Original Message-
 | From: Thomas Muller [mailto:[EMAIL PROTECTED]]
 | Sent: 01 July 2002 18:45
 | To: Log4J Users List
 | Subject: RE: XMLLayout conversion pattern
 |
 |
 | Try to set
 |
 |  param name=LocationInfo value=true /
 |
 | for the appender you're using.
 |
 | --
 |
 | Thomas
 |
 |
 |
 |
 |  | -Original Message-
 |  | From: Christian, William [mailto:[EMAIL PROTECTED]]
 |  | Sent: 01 July 2002 18:26
 |  | To: Log4J Users List
 |  | Subject: XMLLayout conversion pattern
 |  |
 |  |
 |  | How do I customize the XML log event produced when using the XMLLayout
 |  | appender? I would like to include additional data as is
 |  | currently done with
 |  | the ConversionPattern. However, the ConversionPattern is not
 | supported by
 |  | the XMLLayout appender. Specifically, I want to output the
 |  | calling class (%C
 |  | in the ConversionPattern).
 |  |
 |  | Thanks,
 |  | -billc
 |  |
 |
 |
 |
 | *
 | Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
 | reserved.
 | The information supplied in this email should be treated in confidence.
 | No liability whatsoever is accepted for any loss or damage
 | suffered as a result of accessing this message or any attachments.
 |
 | 
 | This email has been scanned for all viruses by the MessageLabs SkyScan
 | service. For more information on a proactive anti-virus service working
 | around the clock, around the globe, visit http://www.messagelabs.com
 | 
 |
 | --
 | To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved.
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


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

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




Viewing XMLLayout log file?

2002-05-02 Thread Rob Mitchell

Hi,

Here's my log file contents:
log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749111 priority=INFO thread=main
log4j:message![CDATA[1st hello world: 1]]/log4j:message
/log4j:event

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749111 priority=INFO thread=main
log4j:message![CDATA[1st hello world: 2]]/log4j:message
/log4j:event

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749151 priority=INFO thread=main
log4j:message![CDATA[1st hello world: 3]]/log4j:message
/log4j:event

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749172 priority=WARN thread=main
log4j:message![CDATA[2nd hello world: 4]]/log4j:message
/log4j:event

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749202 priority=WARN thread=main
log4j:message![CDATA[2nd hello world: 5]]/log4j:message
/log4j:event

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749202 priority=WARN thread=main
log4j:message![CDATA[2nd hello world: 6]]/log4j:message
/log4j:event

log4j:event category=testOne timestamp=1020341749262 priority=FATAL 
thread=main
log4j:message![CDATA[3rd hello world: testOne]]/log4j:message
/log4j:event

log4j:event category=testOne timestamp=1020341749262 priority=FATAL 
thread=main
log4j:message![CDATA[3rd hello world: testOne]]/log4j:message
/log4j:event

log4j:event category=testOne timestamp=1020341749312 priority=FATAL 
thread=main
log4j:message![CDATA[3rd hello world: testOne]]/log4j:message
/log4j:event


so I copy/paste the example from XMLLayout javadocs into this file:

?xml version=1.0 ?

!DOCTYPE log4j:eventSet SYSTEM log4j.dtd [!ENTITY data SYSTEM test.log]

log4j:eventSet xmlns:log4j=http://jakarta.apache.org/log4j;
  data;
/log4j:eventSet

and copied the log4j.dtd into same directory.  So my directory now has all 3 files 
in same place.

When I fire-up IE5.5 browser, I get this error

  The XML page cannot be displayed 
  Cannot view XML input using XSL style sheet. Please correct the error and then click 
the Refresh button, or try again later. 


--

  Reference to undeclared namespace prefix: 'log4j'. Line 1, Position 134 

   

log4j:event category=com.loomissayles.framework.lslogging.LSLoggerFactory 
timestamp=1020341749111 priority=INFO thread=main

Can anyone tell me what I'm doing wrong?

Thanks!



_
Rob Mitchell
Base Class Technologies, Inc.
Java, WebSphere, Domino, Oracle development
[EMAIL PROTECTED]




How to configure the Timestamp using the XMLLayout class ?

2001-11-14 Thread adi Ekstein

Hi,

Im using the XMLLayout class - but the timestamp keep appearing in a
Miliseconds foramt.
How do I configure this to show the Date/time format ?

Thanks

DD

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




Example for XMLLayout.

2001-08-13 Thread subhashini



Hi!
 I have recently started using Log4j.
 Could anyone of U, get me an example as to How I can use XMLLayout and
RollingFileAppender to obtain a XML based log output format.

Regards
Subhashini



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




RE: Example for XMLLayout.

2001-08-13 Thread Krishnamurthy, Balaji (MED)

Subhasini

Following is snippet of the configuration file to do this.

# Set root category to DEBUG and uses 2 appenders CONSOLEAPP and FILEAPP
log4j.rootCategory=DEBUG, CONSOLEAPP, FILEAPP

# CONSOLEAPP is set to be a ConsoleAppender.
log4j.appender.CONSOLEAPP=org.apache.log4j.ConsoleAppender

# CONSOLEAPP uses a PatternLayout.
log4j.appender.CONSOLEAPP.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLEAPP.layout.ConversionPattern=%-4r [%t] %-5p %c %x -
%m%n

# FILEAPP is set to a RollingFileAppender.
log4j.appender.FILEAPP=org.apache.log4j.RollingFileAppender
log4j.appender.FILEAPP.File=mylogfile.xml
log4j.appender.FILEAPP.MaxFileSize=100KB
log4j.appender.FILEAPP.MaxBackupIndex=10

# FILEAPP uses a XMLLayout
log4j.appender.FILEAPP.layout=org.apache.log4j.xml.XMLLayout

Hope this helps
-Balaji

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 3:15 AM
To: [EMAIL PROTECTED]
Subject: Example for XMLLayout.




Hi!
 I have recently started using Log4j.
 Could anyone of U, get me an example as to How I can use XMLLayout and
RollingFileAppender to obtain a XML based log output format.

Regards
Subhashini



-
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]




Re: XMLLayout and well formatted XML documents

2001-07-25 Thread Sam Newman

The source code for the XMLFileAppener is included with the distribution.
You could edit it I guess this file and rename it or something
(WellFormedXMLFileAppender?) - shouldn't be too hard.

sam

Krishnamurthy, Balaji (MED) Wrote:

 Hi folks,

   I started using log4j recently and have started liking it. I needed a
xml
 based log output format.
 So I used org.apache.log4j.xml.XMLLayout  RollingFileAppender and found
 that it is quite good.
 However it does not generate well formed xml documents. There is no root
tag
 and hence the parsers
 throw error while parsing.
 Can somebody point me to an XMLFileAppender if it exists or any better
 solution to get a well fomed xml document ?

 Thanks
 Balaji




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




Re: XMLLayout and well formatted XML documents

2001-07-25 Thread Ceki Gülcü


This is what the javadoc says:

The output of the XMLLayout consists of a series of log4j:event
elements as defined in the log4j.dtd. It does not output a complete
well-formed XML file. The output is designed to be included as an
external entity in a separate file to form a correct XML file.

For example, if abc is the name of the file where the XMLLayout ouput
goes, then a well-formed XML file would be:

?xml version=1.0 ?

!DOCTYPE log4j:eventSet SYSTEM log4j.dtd [!ENTITY data SYSTEM abc]

log4j:eventSet xmlns:log4j=http://jakarta.apache.org/log4j/;
  data;
/log4j:eventSet

This approach enforces the independence of the XMLLayout and the
appender where it is embedded.



At 05:08 25.07.2001 +0530, you wrote:

Hi folks,

  I started using log4j recently and have started liking it. I needed a xml
based log output format.
So I used org.apache.log4j.xml.XMLLayout  RollingFileAppender and found
that it is quite good.
However it does not generate well formed xml documents. There is no root tag
and hence the parsers
throw error while parsing.
Can somebody point me to an XMLFileAppender if it exists or any better
solution to get a well fomed xml document ?

Thanks
Balaji

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

--
Ceki Gülcü - http://qos.ch


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




RE: XMLLayout and well formatted XML documents

2001-07-25 Thread Krishnamurthy, Balaji (MED)

Ceki,

Gotcha, are there any appenders I can use that can give me 
a well-formed document, without having to write one myself.

-Balaji

-Original Message-
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 7:46 PM
To: LOG4J Users Mailing List
Subject: Re: XMLLayout and well formatted XML documents



This is what the javadoc says:

The output of the XMLLayout consists of a series of log4j:event
elements as defined in the log4j.dtd. It does not output a complete
well-formed XML file. The output is designed to be included as an
external entity in a separate file to form a correct XML file.

For example, if abc is the name of the file where the XMLLayout ouput
goes, then a well-formed XML file would be:

?xml version=1.0 ?

!DOCTYPE log4j:eventSet SYSTEM log4j.dtd [!ENTITY data SYSTEM abc]

log4j:eventSet xmlns:log4j=http://jakarta.apache.org/log4j/;
  data;
/log4j:eventSet

This approach enforces the independence of the XMLLayout and the
appender where it is embedded.



At 05:08 25.07.2001 +0530, you wrote:

Hi folks,

  I started using log4j recently and have started liking it. I needed a xml
based log output format.
So I used org.apache.log4j.xml.XMLLayout  RollingFileAppender and found
that it is quite good.
However it does not generate well formed xml documents. There is no root
tag
and hence the parsers
throw error while parsing.
Can somebody point me to an XMLFileAppender if it exists or any better
solution to get a well fomed xml document ?

Thanks
Balaji

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

--
Ceki Gülcü - http://qos.ch


-
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]