DO NOT REPLY [Bug 32752] - MDC.put and MDC.get signatures changed between 1.2 and 1.3
2005-11-02 15:06:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32752>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=32752 ------- Additional Comments From sdeboy <at> iname.com 2005-11-02 16:06 ------- MDC properties were merged with logger repository properties, and when that was done Ceki chose to support Strings as values in the LoggerRepository setProperty method (and change the MDC implementation to match). We could change the methods to use setProperty(String, Object) - we'd just need to change the interface signature for both MDC and LoggerRepository. Since logger repository properties are new with 1.3, I don't think it's a problem. Ceki may have stronger opinions about using strings as values, but since we can do tostring on the object and push it on to the developer to provide a reasonable toString, I don't think this is a big deal. Scott -- -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
(
I don't love to call initAppenders() every time doAppend() is called but I
found no other way. Give me a hint for any other solution.
>
> Just as an example:
>
> protected void appendInternalMessage( Object msg, long timestamp
)
> {
> if( msg != null && msg.toString().trim().length() > 0 )
> {
> // use message as pattern
> PatternLayout layout = new PatternLayout(
msg.toString() );
>
> Calling msg.toString() and creating a new PatternLayout per message
> seems a little costly. It's also wrong (like, what if %C appeared in
You're right. I've changed that.
> your message?)
Don't see the issue if %C appears in the message. It should be possible to
use all the special characters of the PatternLayout in header and footer
lines (and they should be replaced). Using %C you're able to create a
header line like "Dumping cached events because of message initiated by
%C".
Do you think there's a chance to add the appender to the official log4j
stuff?
Regards,
Alex
RSS Feed