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 advantage of the PatternLayout is that it lets you configure the > ConversionPattern property to change the format of the log messages. > Other layouts render to a fixed format e.g. XMLLayout, SimpleLayout, > TTCLayout etc. > > What is the motivation for requiring xml output? www.dpawson.co.uk/xsl
I have some nice tools that let me play with XML quite happily. I do it all day everyday. I.e. If I have data, I can analyze it far more easily if its in XML. > If it is so that log files > can be parsed/transformed remotely then surely you would want the format to > be fixed i.e. complying with some dtd/xsd. Errr yes, and no. If I wrote (the log entries) then I can write templates (in xslt) to match them, so yes regular, not necessarily a DTD to go with it. > > 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! > It works because its format complies with the dtd (contained in the > log4.jar in org\apache\log4j\xml\log4j.dtd) and therefore I can validate it > and transform it into any format I like. Exactly. Filter it, select just certain entries. Its the (slower) version of reading text output from log4j. Is there a way I can .... (I'm looking for help here) Ask log4j to keep all the stuff I can set via the text properties file, and then make it available via the api for the xml formatter? (And the next request will be... Can I ask some module who knows, to output <log4j:log> before my application starts writing and </log4j:log> just before finishing :-) Using external parsed entities is plain hard work when All I want to do is select X Y and Z from a log. It can be done in XSLT 2.0, but its messy. regards DaveP --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
