You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// package & importsclassTylerConfiguratorextendsTylerConfiguratorBaseimplementsConfigurator {
@OverridepublicConfigurator.ExecutionStatusconfigure(LoggerContextloggerContext) {
setContext(loggerContext);
if(${consoleEnabled}) { // <---------------------------- this does not compileLoggerlogger_ROOT = setupLogger("ROOT", "info", null);
AppenderappenderCONSOLE = setupAppenderCONSOLE();
}
returnExecutionStatus.DO_NOT_INVOKE_NEXT_IF_ANY;
}
AppendersetupAppenderCONSOLE() {
ConsoleAppenderappenderCONSOLE = newConsoleAppender();
appenderCONSOLE.setContext(context);
appenderCONSOLE.setName("CONSOLE");
// Configure component of type PatternLayoutEncoderPatternLayoutEncoderpatternLayoutEncoder = newPatternLayoutEncoder();
patternLayoutEncoder.setContext(context);
patternLayoutEncoder.setPattern("%d{YYYY-MM-dd HH:mm:ss.SSS} %5level %logger{0} [%t] - %msg%n");
patternLayoutEncoder.setParent(appenderCONSOLE);
patternLayoutEncoder.start();
// Inject component of type PatternLayoutEncoder into parentappenderCONSOLE.setEncoder(patternLayoutEncoder);
appenderCONSOLE.start();
returnappenderCONSOLE;
}
}
As you can see, the if condition that uses a spring expression is not converted correctly - probably because logback-tyler doesn't know anything about spring.
Is there anything that spring-boot could do to participate in the conversion for spring specific features?
It think adding the appropriate spring-boot code should be feasible.
Do you mean adding it directly to logback-tyler or to have a spring specific version of logback-tyler as a separate project?
If it's the later, i guess addModelHandlerAssociations needs to be non private.
@DarkAtra We also need a subclass of JoranConfigurator which can produce SpringPropertyModel instances from <springProperty> elements. This is certainly feasible but would require a little work.
Take the following configuration:
The logback-tyler output would be:
As you can see, the if condition that uses a spring expression is not converted correctly - probably because logback-tyler doesn't know anything about spring.
Is there anything that spring-boot could do to participate in the conversion for spring specific features?
Versions:
The text was updated successfully, but these errors were encountered: