You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/07/08 02:14:01 UTC
DO NOT REPLY [Bug 21388] New: -
XMLLayout doesn't handle non-String values in MDC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21388>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21388
XMLLayout doesn't handle non-String values in MDC
Summary: XMLLayout doesn't handle non-String values in MDC
Product: Log4j
Version: 1.3alpha
Platform: All
URL: http://http://cvs.apache.org/viewcvs.cgi/jakarta-
log4j/src/java/org/apache/log4j/xml/XMLLayout.java?rev=1
.22&content-type=text/vnd.viewcvs-markup
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Layout
AssignedTo: log4j-dev@jakarta.apache.org
ReportedBy: gail.godbeer@brio.com
line 191 of XMLLayout currently performs the following cast:
String propValue = (String) event.getMDC(propName);
This causes an exception if a non-String is stored in the MDC. It would be
preferable if the code could be changed to invoke toString() on the value, if a
non-String is returned.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org