I've thought about the handling of prohibited character codes in
XMLLayout and my current thought is they should be represented using
Java-style escape sequences, that is if you did:
logger.info("\u0000&\u0145");
You would get something like:
<log4j:message logger="..." level="...">\u0000&Ņ</
log4:message>
Using nested elements in the message to represent prohibited
character codes seemed undesirable since it could not be used to
represent prohibited codes when the codes appear in logger or level
names (since nested elements could not appear within attributes).
The downside of Java-escaping or substituting for prohibited codes is
that you could not distinguish between:
logger.info("\u0000&\u0145");
logger.info("\\u0000&\u0145");
Where the first instance had a prohibited character and the second
was legal. If desired, could possibly add an attribute that
indicated that a substitution occurred somewhere in the element
(either in the logger name, level name, message, MDC, et al) and
could possibly return a total count. It would not allow you to
identify where the bad characters appeared. Something like:
<log4j:message substitions="1">\u0000&Ņ</log4:message>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]