[slf4j-dev] [Bug 11] New: Exceptionhandler Design of MessageFormatter

bugzilla-daemon at gil.qos.ch bugzilla-daemon at gil.qos.ch
Tue Jan 3 20:39:35 CET 2006


http://bugzilla.slf4j.org/show_bug.cgi?id=11

           Summary: Exceptionhandler Design of MessageFormatter
           Product: SLF4J
           Version: 1.0beta9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core API
        AssignedTo: dev at slf4j.org
        ReportedBy: boris.unckel.mlg at gmx.net


The current org.slf4j.impl.MessageFormatter is null safe during
formatting the given object(s) for a message.
Due to String.valueOf(Object o) in StringBuffer.append(Object o).

It does not deal with any RuntimeExceptions thrown by the toString() method
of the object, caused by a bad implementation in the using system.

It is a design decision to fail the log operation or to complete the log
operation and show the exception in the log.

It then has to be decided whether to log this exception in the underlying log
API or to show in System.err.

I recommend to catch the exception and to give it to the underlying log API.
This would mean to create two log- events(log4j) LogRecords(JUL) within one log
operation of the user.

See
http://marc.theaimsgroup.com/?l=slf4j-dev&m=113630134301600&w=2
for details.

-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the slf4j-dev mailing list