Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Can run with includeThreadContext #5

Closed
etlweather opened this issue Oct 27, 2016 · 2 comments
Closed

Can run with includeThreadContext #5

etlweather opened this issue Oct 27, 2016 · 2 comments

Comments

@etlweather
Copy link

With version 1.2.1, if I add <includeThreadContext>true</includeThreadContext> to my logback configuration in a SpringBoot application, the application does not start with the following exception. Everything works if I take that configuration out. I don't have this problem with 1.2.

java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.joran.spi.Interpreter@18:31 - no applicable action for [includeThreadContext], current ElementPath  is [[configuration][appender][includeThreadContext]]
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161)
    at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:72)
    at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:50)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114)
    at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:299)
    at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:235)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:208)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:68)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
@etlweather
Copy link
Author

Actually, I seem to be getting this in 1.2 as well.

@sandra-thieme
Copy link
Owner

Hi

includeThreadContext was included in the examples by accident, there is no such thing for this appender as of yet. SpringBoot seems to do a check on the validity of your logback configuration and fails if there is configuration that is not recognized by the appender.

I've updated the examples to not include includeThreadContext.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants