[logback-dev] [JIRA] Commented: (LBCLASSIC-47) LoggingEvent.formattedMessage is only initialized in c'tor.

Joern Huxhorn (JIRA) noreply-jira at qos.ch
Fri Oct 31 15:24:21 CET 2008


    [ http://jira.qos.ch/browse/LBCLASSIC-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10872#action_10872 ] 

Joern Huxhorn commented on LBCLASSIC-47:
----------------------------------------

Thank you for implementing this change,

Jörn.

> LoggingEvent.formattedMessage is only initialized in c'tor.
> -----------------------------------------------------------
>
>                 Key: LBCLASSIC-47
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-47
>             Project: logback-classic
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: unspecified
>         Environment: Operating System: All
> Platform: All
>            Reporter: Joern Huxhorn
>            Assignee: Ceki Gulcu
>             Fix For: 0.9.12
>
>
> 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 LBCLASSIC-32.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       


More information about the logback-dev mailing list