https://issues.apache.org/bugzilla/show_bug.cgi?id=37182


Curt Arnold <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Curt Arnold <[EMAIL PROTECTED]>  2008-08-05 21:17:35 PST ---
The first patch would be appropriate if the problem were:

logger.info(null);

However, that isn't the problem reported and control would not reach
DefaultRenderer since LoggingEvent.getRenderedMessage would short circuit it.  

The problem is passing any object whose toString() method may result in either
a RuntimeException or Error.  By far the most common message parameter is a
String, but that is handled by a special case check in
LoggingEvent.getRenderedMessage.  Adding the try/catch block in DefaultRenderer
will add some overhead, but only in the uncommon case where the message isn't a
String.  It isn't obvious what should be returned in that case, I have chosen
to return the ex.toString() of the exception.  If you want something else, you
could provide your own renderer (or make sure that your message object does not
throw an exception).

Committed rev 683102.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to