0

I am using logback 1.1.8 with spring boot 1.4.2 as soon as I change the name of logback.xml to logback-spring.xml application stops logging. And when I use logback.xml, I cannot use the springProfiles tags.

15:55:23,459 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@153:46 - no applicable action for [appender-ref], current ElementPath is [[configuration][springProfile][root][appender-ref]] 15:55:23,459 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@154:46 - no applicable action for [appender-ref], current ElementPath is [[configuration][springProfile][root][appender-ref]] 15:55:23,460 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@158:36 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]

Please, suggest if this issue is faced by anyone?

1
  • 1
    Welcome to Stack Overflow! Please take the tour, have a look around, and read through the help center, in particular How do I ask a good question? and What topics can I ask about here? From that second link: "Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it." You also must provide your question as text, not as images. Commented Dec 22, 2016 at 21:12

1 Answer 1

0

Spring boot tries to load the logback.xml from classpath, In my case, though I have replaced logback.xml with logback-spring.xml it was reading logback.xml, on debugging found that one of the libraries in classpath is providing the logback.xml causing this issue

Sign up to request clarification or add additional context in comments.

2 Comments

So how did you resolve the issue? Did you remove the complete dependency or is there a way to configure spring to use a specific logback config file?
In my case, it was an internal library so I had to fix its pom to not include logback.xml in final artifact after this spring was able to pull the correct one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.