[logback-dev] [JIRA] Resolved: (LBCLASSIC-145) SocketAppender is omitting CallerData.

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Sun Aug 9 20:51:10 CEST 2009

     [ http://jira.qos.ch/browse/LBCLASSIC-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ceki Gulcu resolved LBCLASSIC-145.

    Fix Version/s: 0.917
       Resolution: Fixed

Fixed in revision 2433. 

Joern, thank you for reporting this bug and suggesting a fix. 

The caller data array of the original ILoggingEvent is populated as soon as its getCallerData() method is called. Such an invocation is performed by SocketAppender in its postProcessEvent method:

  protected void postProcessEvent(ILoggingEvent event) {
    if (includeCallerData) {

> SocketAppender is omitting CallerData.
> --------------------------------------
>                 Key: LBCLASSIC-145
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-145
>             Project: logback-classic
>          Issue Type: Bug
>          Components: appender
>    Affects Versions: 0.9.16
>            Reporter: Joern Huxhorn
>            Assignee: Ceki Gulcu
>             Fix For: 0.917
> LoggingEventVO is never assigning a value to callerDataArray so the caller data is omitted regardless of the value of SocketAppenders includeCallerData property.
> As far as I can tell, this should probably be implemented in 
> LoggingEventVO build(ILoggingEvent le)
> like this:
> if(le.hasCallerData()) {
>   ledo.callerData = le.getCallerData();
> }
> I'm unsure where the caller data should be obtained, though.
> LoggingEventPreSerializationTransformer will probably need an includeCallerData property that's initialized whenever the setIncludeCallerData of SocketAppender is called. It could then execute getCallerData(), if requested, before calling build.

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