Dave, Are you referring to: http://marc.theaimsgroup.com/?l=log4j-user&m=111401761531451&w=2
If so it appears that you are trying to use the PatternLayout class to render a custom format xml document? The XMLLayout class pointed out by Hakan, renders log events as xml conforming to the log4j.dtd. Use of this does not require you to have xml markup in the config file (.properties or.xml) as its format is fixed If I wanted a custom xml representation of log events, I would consider subclassing XMLLayout and overriding the format(Writer output, LoggingEvent event) method, or do you have other requirements? Regards Andy > -----Original Message----- > From: Dave Pawson [mailto:[EMAIL PROTECTED] > Sent: 25 April 2005 17:34 > To: Hakan Koseoglu > Cc: Log4J Users List > Subject: Re: Writing log in xml format > > On Mon, 2005-04-25 at 12:35 +0100, Hakan Koseoglu wrote: > > > Can I write the log in an xml format using Log4j? > > > If yes, please provide a simple example configuration or necessary > > > steps. > > You can always use org.apache.log4j.xml.XMLLayout. > > Except that an xml file can't have xml markup in an attribute value. > The point I made a few days ago. > > regards DaveP > > > --------------------------------------------------------------------- > 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]
