logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21388] New: - XMLLayout doesn't handle non-String values in MDC
Date Tue, 08 Jul 2003 00:14:01 GMT
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


Mime
View raw message