why i need to exclude "spring-boot-starter-logging" to be able to use spring-geode?

Marlon David Rodriguez :

to be able to use spring-geode, i need to exclude starter-logging, otherwise i run into:

Caused by: java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLogger cannot be cast to org.apache.logging.log4j.core.Logger
at org.apache.geode.internal.logging.LogService.init(LogService.java:81) ~[geode-core-1.2.1.jar:na]
at org.apache.geode.internal.logging.LogService.<clinit>(LogService.java:72) ~[geode-core-1.2.1.jar:na]
... 41 common frames omitted

my POM now looks like this:

 <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  <exclusions>
    <exclusion>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-logging</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.springframework.geode</groupId>
  <artifactId>spring-geode-starter</artifactId>
</dependency>
<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-geode</artifactId>
  <version>2.0.10.RELEASE</version>
</dependency>

what should i do?

ibexit :

Geode introduces logging dependencies (log4j) which collide with spring logging: https://mvnrepository.com/artifact/org.apache.geode/geode-core/1.7.0

Please see https://lists.apache.org/thread.html/311d0e4bf742a2477f337f1028bdf991d16560c1bb0e7cd0f0ea9c1d@<user.geode.apache.org>

Spring uses Logback by default. You'll need to change the logging framework to log4j https://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html#howto-configure-log4j-for-logging

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=93074&siteId=1