Reputation: 189
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?
Upvotes: 1
Views: 760
Reputation: 189
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>
Upvotes: 1