I was expecting scan="true" with scanPeriod="5 seconds" to work with logback configuration in SpringBoot 1.4.2.RELEASE

The error I get on updating a logger level inside is

-ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:39 - no applicable action for [springProfile],   
 current ElementPath  is [[configuration][springProfile]]

Same goes for springProperty

 -ERROR in ch.qos.logback.core.joran.spi.Interpreter@12:125 - no applicable action for [springProperty],    
 current ElementPath  is [[configuration][springProperty]]

Without springProfile and springProperty scan happens as expected, but only when changes done in target/classes/logback-spring.xml and not in src/main/resources/logback-spring.xml

Without setting scan, springProfile working as expected.

Maven is being used for this SpringBoot Web app.

Comment From: wilkinsona

Sadly, I think we may need to document this as a limitation. To support springProfile and springProperty we use a JoranConfigurator subclass. Unfortunately, Logback's ReconfigureOnChangeTask doesn't give us an opportunity to plug it in:

private void performXMLConfiguration(LoggerContext lc, URL mainConfigurationURL) {
    JoranConfigurator jc = new JoranConfigurator();
    jc.setContext(context);
    StatusUtil statusUtil = new StatusUtil(context);
    List<SaxEvent> eventList = jc.recallSafeConfiguration();

    URL mainURL = ConfigurationWatchListUtil.getMainWatchURL(context);
    lc.reset();
    long threshold = System.currentTimeMillis();
    try {
        jc.doConfigure(mainConfigurationURL);
        if (statusUtil.hasXMLParsingErrors(threshold)) {
            fallbackConfiguration(lc, eventList, mainURL);
        }
    } catch (JoranException e) {
        fallbackConfiguration(lc, eventList, mainURL);
    }
}

Comment From: wilkinsona

I've just noticed that this is a duplicate of #5611

Comment From: extraneu

My apologies for commenting on a closed ticket, but shouldn't this limitation/RFE be reported to logback? (I can't find it on their JIRA)

Comment From: snicoll

@extraneu I am not aware this has been reported but feel free to do so.

Comment From: guai

Hi Any workaroud to make logback+spring reloadable?