[logback-dev] [Bug 139] New: LoggingEvent.formattedMessage is only initialized in c'tor.

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Mar 20 18:09:46 CET 2008


http://bugzilla.qos.ch/show_bug.cgi?id=139

           Summary: LoggingEvent.formattedMessage is only initialized in
                    c'tor.
           Product: logback-classic
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Other
        AssignedTo: logback-dev at qos.ch
        ReportedBy: joern at huxhorn.de


LoggingEvent.formattedMessage is only initialized if message and arguments are
supplied during construction. If the default c'tor is used and message and
arguments are provided using setMessage and setArgumentArray then
formattedMessage will stay null.

Instead, formattedMessage should be declared transient and the actual
formatting should take place lazily during getFormattedMessage call.

This would fix this problem, would increase general logging performance
(formatting only if actually needed) and would decrease the size of serialized
log events significantly while it would not change anything from the callers
point of view.

This is a follow-up of bug #100.


-- 
Configure bugmail: http://bugzilla.qos.ch/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 logback-dev mailing list