SBDG's Logging auto-configuration does not appropriately "get out of the way" when the user explicitly configures GemFire/Geode logging, specifically with SDG's @EnableLogging annotation.
This results in a RuntimeException thrown by Spring Boot due to a duplicate bean definition registration, which Spring Boot does not allow by default. That is, Spring Boot disables bean definition overriding and a user must explicitly configure bean definition overriding with the following Spring Boot property in application.properties (or other PropertySource):
spring.main.allow-bean-definition-overriding=true
This is also the workaround for this bug.
Additionally, a user may configure logging simply by set 1 of the 2 SDG properties:
It is usually preferable to only configure 1 of the 2 properties, and specifically spring.data.gemfire.logging.level. However, either is acceptable and defining 1 property (e.g. spring.data.gemfire.cache.log-level) in terms of the other (i.e. spring.data.gemfire.logging.level) is beneficial, depending on the context.
SBDG's Logging auto-configuration does not appropriately "get out of the way" when the user explicitly configures GemFire/Geode logging, specifically with SDG's
@EnableLogging
annotation.This results in a
RuntimeException
thrown by Spring Boot due to a duplicate bean definition registration, which Spring Boot does not allow by default. That is, Spring Boot disables bean definition overriding and a user must explicitly configure bean definition overriding with the following Spring Boot property inapplication.properties
(or otherPropertySource
):This is also the workaround for this bug.
Additionally, a user may configure logging simply by set 1 of the 2 SDG properties:
It is usually preferable to only configure 1 of the 2 properties, and specifically
spring.data.gemfire.logging.level
. However, either is acceptable and defining 1 property (e.g.spring.data.gemfire.cache.log-level
) in terms of the other (i.e.spring.data.gemfire.logging.level
) is beneficial, depending on the context.