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 responsible for escaping those characters
  that XML has declared that it doesn't like (< and &....
OK and [[ => [Z
Anything else the author should transpose into numerical character
entities.


>   My preference would be to use character entities 
> for markup characters or any non-USASCII character which would 
> eliminate the need for the CDATA sections and would allow the log to 
> still be readable in case an editor assumes ISO-8859-1 and the document 
> is UTF-8 or vice-versa. 
I'd say (contra to some 'laws' :-) that log4j make no assumptions about
downstream usage.
produce (and declare) utf-8 encoding. No more. it's impossible to 
predict what people will do with a file?


>  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 duplicate.  I think it should have been 
> marked final, but then I think that about a lot of things.

Ah! Hope for me yet!
  

> >
> > 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?
> 
> What is "all the stuff I can set via the text properties"?  Anything 
> you can place in the MDC, NDC or properties should be present in the 
> generated XML. 
That's a comment I have on 'the book'.
Both those terms are used, without explanation.
Am I supposed to know what they mean?
I don't.

> >
> 
> A log file can be appended to by several invocations of an application 
> each of which appends to the running log.  If each invocation wrote 
> <log4j:log> and </log4j:log> at its start up and termination, you would 
> still have the problem of multiple document elements.
> 
> A possible solution is to use a o.a.l.rolling.RollingFileAppender with 
> a RollingPolicy that instead of just renaming the file on a roll, it 
> would add the outer document element.

Hence it was a request :-)

Someone knows when this logger starts.... (the timing thingy perhaps)
That's the class I'm talking about.

regards DaveP




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

Reply via email to