1

I have an legacy osgi application and embedded spring boot as a bundle in that.

The legacy app uses logging.properties(JUL) as logging system. When spring boot bundle starts, LogBack takes control of logging and logging.properties doesn't work anymore.

I tried with

 org.springframework.boot.logging.LoggingSystem=org.springframework.boot.logging.java.JavaLoggingSystem 

 logging.config=/xxx/yyy/zzz/logging.properties 

and not work

Can I directly use the defined logging.properties in spring boot? And if yes, How?

1

1 Answer 1

1

remove default logback and add necessary dependency seems work

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-logging</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
    </dependency>
Sign up to request clarification or add additional context in comments.

Comments

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.