edit-icon download-icon

Java SDK log library

Last Updated: Apr 11, 2018

Which log library is used by default in Table Store Java SDK?

Table Store Java SDNK depends on SLF4J, and log4j2 is used as the default log implementation library.

How do I replace the default log library?

Delete log4j2 from your Java SDK dependencies. Once deleted, SLF4J automatically finds another dependent log library that can implement the SLF4J API in your application.

  1. <dependency>
  2. <groupId>com.aliyun.openservices</groupId>
  3. <artifactId>ots-public</artifactId>
  4. <version>2.2.4</version>
  5. <exclusions>
  6. <exclusion>
  7. <groupId>org.apache.logging.log4j</groupId>
  8. <artifactId>log4j-api</artifactId>
  9. </exclusion>
  10. <exclusion>
  11. <groupId>org.apache.logging.log4j</groupId>
  12. <artifactId>log4j-core</artifactId>
  13. </exclusion>
  14. <exclusion>
  15. <groupId>org.apache.logging.log4j</groupId>
  16. <artifactId>log4j-slf4j-impl</artifactId>
  17. </exclusion>
  18. </exclusions>
  19. </dependency>
Thank you! We've received your feedback.