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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to