Description
John Blum opened DATAGEODE-299 and commented
The SDG @EnableLogging
annotation no longer has any effect or control over the logging capabilities of Apache Geode (and by extension, Pivotal GemFire) any longer.
This is to say, that GemFire/Geode's own configuration properties (e.g. -Dgemfire.log-level
) absolutely have no effect any more as of Apache Geode 1.9.2 & Pivotal GemFire 9.8.4.
The only way to log output from Apache Geode or Pivotal GemFire to Standard Out, to a log file, or other destination is to..
-
Include a logging provider on the Spring application classpath (e.g.
logback-classic
if the Spring application is using the SLF4J API, which is quite common, particularly for Spring Boot applications). -
If the logging provider is not Log4j (i.e.
log4j-core
), then you will additionally need to add a adapter/bridge JAR between Log4j and the logging provider. Note, Apache Geode/Pivotal GemFire use the Log4j API to log output for Apache Geode and Pivotal GemFire respectively.
For example, if you are using SLF4J with Logback as your logging provider, then you will additionally need to add the org.apache.logging.log4j:log4j-to-slf4j
dependency to your Spring application classpath.
- Then a user must supply a logging provider configuration file at the configured location with the appropriate Loggers and Appender to log output from either Apache Geode/Pivotal GemFire or Spring, and any other 3rd party libs you wish to log output for.
For example: https://github.com/spring-projects/spring-data-geode/blob/master/spring-data-geode/src/test/resources/logback.xml
In addition to the deprecation, we must also provide documentation in the Annotation-based Configuration Model Chapter of the Reference Documentation, here: https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config-logging
No further details from DATAGEODE-299