[ 
https://issues.apache.org/jira/browse/QPID-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942461#comment-15942461
 ] 

Keith Wall commented on QPID-7468:
----------------------------------

In addition to the changes already included in the diff, there is an additional 
problem.   The system tests generate a log file per test.  This is implemented 
using logbook's {{SiftAppender}} and a MDC.   Unfortunately 
https://github.com/qos-ch/logback/commit/aa7d58 means that MDCs are no longer 
inherited between application threads, so logging produced by spawned threads 
no longer goes into the test's log file.   Logback gives no way to restore the 
old behaviour.   It would be possible to change Qpid's thread factories to copy 
the MDC between threads, but this seems quite intrusive.  I think a alternative 
would be to implement an {{Discriminator}} that uses discriminates based on 
custom context property value (ch.qos.logback.core.Context#getProperty). 
QpidTestCase#run and BrokerLogbackSocketLoggerImpl#createAppenderInstance will 
need to set the property containing the {{classQualifiedTestName}}.  I have no 
tried this approach, but think it should work.

> Upgrade logback to 1.1.7 and SLF4J to 1.7.22
> --------------------------------------------
>
>                 Key: QPID-7468
>                 URL: https://issues.apache.org/jira/browse/QPID-7468
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0.4
>            Reporter: Alberto
>             Fix For: qpid-java-broker-7.0.0
>
>         Attachments: upgradeLogBack_1_1_10.diff, upgradeLogBack_1_1_7.diff
>
>
> The current version used in qpid-broker 6.0.4 for logback is 1.1.3. With the 
> version 1.1.7 logback broke backwards compatibility in  StatusManager 
> interface (ch.qos.logback.core.status.StatusManager).
> After this change, BrokerFileLoggerImpl is failing to add the 
> `BrokerFileLoggerStatusListener` to the loggerContext due to binary 
> incompatibility  (See line 210 of BrokerFileLoggerImpl for more info).
> {code:java}
>  @Override
>     protected Appender<ILoggingEvent> createAppenderInstance(Context 
> loggerContext)
>     {
>         SystemConfig<?> systemConfig = 
> (SystemConfig<?>)getParent(Broker.class).getParent(SystemConfig.class);
>         _logbackStatusListener = new BrokerFileLoggerStatusListener(this, 
> systemConfig);
>         _statusManager = loggerContext.getStatusManager();
>         _statusManager.add(_logbackStatusListener);
>         final RollingFileAppender<ILoggingEvent> appender = new 
> RollingFileAppender<>();
>         AppenderUtils.configureRollingFileAppender(this, loggerContext, 
> appender);
>         return appender;
>     }
> {code}
> We've noticed this after update spring boot to the latest version 
> 1.4.1.Release which includes logback 1.1.7.
> As a workaround, you can still downgrade your version of logback in your 
> project to 1.1.3 but it would be nice to have it upgraded



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to