Hi, Thanks for all the hints so far! I do believe the proposed fixes would work indeed - however, the reason for coming to this forum is that I believe, this is maybe something to be considered in Log4J.
My reasoning is as follows: encoding of linefeeds might be necessary or not depending on nothing else, but the appender! If I am using database logging, I do not care about the linefeeds - the way the information is delivered to the database guarantees that linefeeds play no role (e.g. they will not result in two or more log records written). Some output formats, however, reserve the linefeed for a special purpose: separating log entries. Analogy: if I pass "value</name>" to a DOM implementation, it will convert it into "value<:/name>:" on the output, at all times. Also from a caller perspective it would either result in extra coding, like in the example of Remko (still, the necessity of this coding would be dependent on what appender is used) or there would be a "secure" configuration, as suggested by Woonson, which is, however, not the default... So my conclusion of all this was that certain appenders reserve special characters, and therefore they should encode/filter them, possibly depending on a configuration switch for the specific appender. I would also be glad to offer incorporating this into log4j in case it is agreed - but of course it should be the decision of the community first :) Cheers, Gabor --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
