You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Kremer, Mark" <MK...@zolldata.com> on 2005/06/13 17:32:28 UTC

1.2.9 log4net.Layout.XMLLayout

> Are there any examples showing how to configure this layout type? I am hoping to get an output file that would look like:
> 
> <header>
> 	<date>11:33:34</date>
> 	<user>JSmith</user>
> 	<info>Blah</info>
> 	etc..
> </header>
> <header>
> 	<date>11:35:34</date>
> 	<user>JJones</user>
> 	<info>Blah again</info>
> 	etc..
> </header>
> etc...
> 
> Is this possible?
> 
> 
> __________________________________________________
> 
> Mark Kremer                        
> User Interface Specialist                             
> ZOLL Data Systems (formerly Pinpoint Technologies)
> 			      
> 12202 Airport Way, Suite 300
> Broomfield, Colorado 80021 
> 	 
> O (303) 801-1833
> F (303) 801-0001
> www.zolldata.com
> 

Re: 1.2.9 log4net.Layout.XMLLayout

Posted by Ron Grabowski <ro...@yahoo.com>.
There was a thread about this on the log4j list:

http://tinyurl.com/9xusy
http://www.mail-archive.com/log4j-user%40logging.apache.org/msg03488.html

Some possible solutions include writing your own layout or storing the
data using XmlLayoutSchemaLog4j and transforming it at a later time.
You may be able to hack together something using a PatternLayout:

 <date>%d</date><message>%m</message>

but by the time you included all the necessary fields you'd be
duplicating much of what XmlLayoutSchemaLog4j already does.

--- "Kremer, Mark" <MK...@zolldata.com> wrote:

> > Are there any examples showing how to configure this layout type? I
> am hoping to get an output file that would look like:
> > 
> > <header>
> > 	<date>11:33:34</date>
> > 	<user>JSmith</user>
> > 	<info>Blah</info>
> > 	etc..
> > </header>
> > <header>
> > 	<date>11:35:34</date>
> > 	<user>JJones</user>
> > 	<info>Blah again</info>
> > 	etc..
> > </header>
> > etc...
> > 
> > Is this possible?
> > 
> > 
> > __________________________________________________
> > 
> > Mark Kremer                        
> > User Interface Specialist                             
> > ZOLL Data Systems (formerly Pinpoint Technologies)
> > 			      
> > 12202 Airport Way, Suite 300
> > Broomfield, Colorado 80021 
> > 	 
> > O (303) 801-1833
> > F (303) 801-0001
> > www.zolldata.com
> > 
>