You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <ji...@apache.org> on 2017/02/28 12:00:50 UTC

[jira] [Updated] (QPID-7468) Upgrade logback to 1.1.7 and SLF4J to 1.7.22

     [ https://issues.apache.org/jira/browse/QPID-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Godfrey updated QPID-7468:
------------------------------
    Attachment: upgradeLogBack_1_1_7.diff
                upgradeLogBack_1_1_10.diff

Upgrading to LogBack 1.1.7 causes some unit tests to fail as they mock Context whereas changes in LogBack 1.1.4 cause this to be cast to LoggingContext (without an instanceof check).

Moving to the most recent release on the LogBack 1.1.x line reveals another change in the API which causes compilation failure (ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP#setMaxFileSize(...) input type changed... also getMaxFileSize is removed).

Given the fact the LogBack seems to change its public API in minor release versions (often without any public notification) I'm not sure of the best way to deal with the issues raised in [#1|https://github.com/apache/qpid-java/pull/1] as picking any particular revision of logback to use would seem to risk causing a problem if people wish to combine in a context where another version may also exist.

> 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-7.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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org