Re: Writing log in xml format

2005-04-29 Thread Dave Pawson
On Thu, 2005-04-28 at 15:21 -0500, Curt Arnold wrote: > On Apr 28, 2005, at 1:42 PM, Dave Pawson wrote: > > > On Wed, 2005-04-27 at 15:16 -0500, Curt Arnold wrote: > > > > > >>> > >>> Am I making sense? > >>> > >> > >> Okay, I wanted to make sure that you wanted what I think that I would > >> wan

Re: Writing log in xml format

2005-04-29 Thread Dave Pawson
On Thu, 2005-04-28 at 15:02 -0500, Curt Arnold wrote: > On Apr 28, 2005, at 1:40 PM, Dave Pawson wrote: > > > > > I think that means the 'end user' shouldn't have to escape his content? > > If so I agree. > > logger.info("One < two"); etc. > > We are thinking alike then. Your first message had s

Re: Writing log in xml format

2005-04-28 Thread Curt Arnold
On Apr 28, 2005, at 1:42 PM, Dave Pawson wrote: On Wed, 2005-04-27 at 15:16 -0500, Curt Arnold wrote: Am I making sense? Okay, I wanted to make sure that you wanted what I think that I would want in that situation. If I were to add that, my initial approach would be to add a new layout (say XSLTL

Re: Writing log in xml format

2005-04-28 Thread Curt Arnold
On Apr 28, 2005, at 1:40 PM, Dave Pawson wrote: I think that means the 'end user' shouldn't have to escape his content? If so I agree. logger.info("One < two"); etc. We are thinking alike then. Your first message had said "Not the applications concern" and " The application should be responsible"

Re: Writing log in xml format

2005-04-28 Thread Dave Pawson
On Wed, 2005-04-27 at 15:16 -0500, Curt Arnold wrote: > > > > Am I making sense? > > > > Okay, I wanted to make sure that you wanted what I think that I would > want in that situation. > > If I were to add that, my initial approach would be to add a new layout > (say XSLTLayout) that would us

Re: Writing log in xml format

2005-04-28 Thread Dave Pawson
On Wed, 2005-04-27 at 15:14 -0500, Curt Arnold wrote: > On Apr 27, 2005, at 1:22 PM, Dave Pawson wrote: > > > On Wed, 2005-04-27 at 13:03 -0500, Curt Arnold wrote: > >> I'm not fond of the CDATA sections either. Since the XMLLayout is > >> not > >> aware of the encoding of the writer, it does n

Re: Writing log in xml format

2005-04-27 Thread Hakan Koseoglu
Hi Andy! :) How many Andy McBrides can there be interested in pushing weird stuff into jms queues? I wonder... > Ok, now I'm worried. > I use a subclass of XMLLayout (see below) which was based on the log4j1.2.9 > implementation. I've seen that there have been big changes to the > implementation

Re: Writing log in xml format

2005-04-27 Thread Curt Arnold
On Apr 27, 2005, at 3:52 PM, Andy McBride wrote: On Wed, 27 Apr 2005 13:03:02 -0500 Curt Arnold <[EMAIL PROTECTED]> wrote: There is a decent likelihood for XMLLayout to change before final release of log4j 1.3, so it may be better to avoid subclassing it since it really doesn't appear to be desig

RE: Writing log in xml format

2005-04-27 Thread Andy McBride
On Wed, 27 Apr 2005 13:03:02 -0500 Curt Arnold <[EMAIL PROTECTED]> wrote: > There is a decent likelihood for XMLLayout to change >before final release of log4j 1.3, so it may be better to >avoid subclassing it since it really doesn't appear to be >designed for extension and not that hard to d

Re: Writing log in xml format

2005-04-27 Thread Curt Arnold
On Apr 27, 2005, at 12:35 PM, Dave Pawson wrote: Basic requirement. To enable the selection of any existing formatting option and add it to the XML output, using my own specified elements or attributes. E.g. %L # Linenumber Somewhere I'd like to be able to say I want the linenumber, I'd like it o

Re: Writing log in xml format

2005-04-27 Thread Curt Arnold
On Apr 27, 2005, at 1:22 PM, Dave Pawson wrote: On Wed, 2005-04-27 at 13:03 -0500, Curt Arnold wrote: I'm not fond of the CDATA sections either. Since the XMLLayout is not aware of the encoding of the writer, it does not know when to create character entities. Not the applications concern is my

Re: Writing log in xml format

2005-04-27 Thread Dave Pawson
On Wed, 2005-04-27 at 13:03 -0500, Curt Arnold wrote: > I'm not fond of the CDATA sections either. Since the XMLLayout is not > aware of the encoding of the writer, it does not know when to create > character entities. Not the applications concern is my response. The application should be res

Re: Writing log in xml format

2005-04-27 Thread Curt Arnold
On Apr 27, 2005, at 12:21 PM, Dave Pawson wrote: The XMLLayout works fine for me although it is not the most human readable xml! Errr yes. I'm taking your advice and subclassing that. First thing will be to remove the CDATA sections! I'm not fond of the CDATA sections either. Since the XMLLayou

RE: Writing log in xml format

2005-04-27 Thread Dave Pawson
On Wed, 2005-04-27 at 01:53 -0500, Curt Arnold wrote: > I sorry I really can't follow this thread. There seem to be a couple > possible issues that are trying to be raised, but I can't be sure. > > 1. You don't like using < or > in an XML configuration file to > specify a '<' or '>' character

RE: Writing log in xml format

2005-04-27 Thread Dave Pawson
On Tue, 2005-04-26 at 21:31 +0100, Andy McBride wrote: > Hi Dave, > > Some appenders allow you specify a 'layout' class to be used which is > responsible for rendering/formatting each log message. Examples include > HTMLLayout, XMLLayout and the PatternLayout you've been using. > > The main a

RE: Writing log in xml format

2005-04-26 Thread Curt Arnold
I sorry I really can't follow this thread. There seem to be a couple possible issues that are trying to be raised, but I can't be sure. 1. You don't like using < or > in an XML configuration file to specify a '<' or '>' character. Using a PatternLayout to fabricate XML elements is not robust

RE: Writing log in xml format

2005-04-26 Thread Andy McBride
orm it into any format I like. Hope this helps. Regards Andy > -Original Message- > From: Dave Pawson [mailto:[EMAIL PROTECTED] > Sent: 26 April 2005 17:18 > To: [EMAIL PROTECTED] > Cc: 'Log4J Users List' > Subject: RE: Writing log in xml format > >

RE: Writing log in xml format

2005-04-26 Thread Dave Pawson
On Mon, 2005-04-25 at 21:39 +0100, Andy McBride wrote: > > 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 format. Is ther

RE: Writing log in xml format

2005-04-26 Thread Dave Pawson
On Mon, 2005-04-25 at 21:39 +0100, Andy McBride wrote: > 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? Yes, I've a nasty habit

RE: Writing log in xml format

2005-04-25 Thread Andy McBride
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 1

Re: Writing log in xml format

2005-04-25 Thread Dave Pawson
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

Re: Writing log in xml format

2005-04-25 Thread Hakan Koseoglu
> 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. Configure it in your log4j.properties/xml file like logj.appender.aaa.logfile.layout=org.apache.log4j.xml.XMLLayout.

Writing log in xml format

2005-04-25 Thread Jitendra Kharche
Hello List, Can I write the log in an xml format using Log4j? If yes, please provide a simple example configuration or necessary steps. Regards, Jitendra