[ https://issues.apache.org/jira/browse/S2GRAPH-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15560447#comment-15560447 ]
Jong Wook Kim commented on S2GRAPH-117: --------------------------------------- Replying to Doyung's comment: So the whole philosophy of SLF4j is to make slf4j-api the *ONLY* compile dependency about logging, and add logging backend and any bridging machineries. however, the below is our compile dependencies related to logging other than slf4j-api, of s2core. {noformat} org.apache.s2graph:s2core_2.11:0.1.0 [S] +-ch.qos.logback:logback-classic:1.1.2 +-org.apache.hbase:hbase-client:1.2.2 | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-protocol:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 | +-org.apache.zookeeper:zookeeper:3.4.6 | | +-log4j:log4j:1.2.17 | | +-org.slf4j:slf4j-log4j12:1.7.5 | | +-log4j:log4j:1.2.17 +-org.apache.hbase:hbase-common:1.2.2 | +-commons-logging:commons-logging:1.2 | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-protocol:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 +-org.apache.hbase:hbase-hadoop-compat:1.2.2 | +-commons-logging:commons-logging:1.2 | +-log4j:log4j:1.2.17 +-org.apache.hbase:hbase-hadoop2-compat:1.2.2 | +-commons-logging:commons-logging:1.2 | +-log4j:log4j:1.2.17 | +-org.apache.hadoop:hadoop-common:2.5.1 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-net.java.dev.jets3t:jets3t:0.9.0 | | | +-commons-logging:commons-logging:1.2 | | | +-org.apache.httpcomponents:httpclient:4.2.5 | | | | +-commons-logging:commons-logging:1.2 | | +-org.apache.hadoop:hadoop-auth:2.5.1 | | | +-log4j:log4j:1.2.17 | | | +-org.apache.httpcomponents:httpclient:4.2.5 | | | | +-commons-logging:commons-logging:1.2 | | | +-org.slf4j:slf4j-log4j12:1.7.5 | | | +-log4j:log4j:1.2.17 | | +-org.slf4j:slf4j-log4j12:1.7.5 | | | +-log4j:log4j:1.2.17 | | | +-org.slf4j:slf4j-api:1.7.21 | | +-tomcat:jasper-runtime:5.5.23 | | | +-commons-el:commons-el:1.0 | | | +-commons-logging:commons-logging:1.2 | +-org.apache.hadoop:hadoop-mapreduce-client-core:2.5.1 | | +-org.apache.hadoop:hadoop-yarn-common:2.5.1 | | | +-commons-logging:commons-logging:1.2 | | | +-log4j:log4j:1.2.17 | | | +-org.apache.hadoop:hadoop-yarn-api:2.5.1 | | | | +-commons-logging:commons-logging:1.2 | | +-org.slf4j:slf4j-log4j12:1.7.5 | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-annotations:1.2.2 | +-log4j:log4j:1.2.17 +-org.apache.hbase:hbase-server:1.2.2 | +-commons-logging:commons-logging:1.2 | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-client:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-annotations:1.2.2 | | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-protocol:1.2.2 | | | +-commons-logging:commons-logging:1.2 | | | +-log4j:log4j:1.2.17 | | | +-org.apache.hbase:hbase-annotations:1.2.2 | | | +-log4j:log4j:1.2.17 | | +-org.apache.zookeeper:zookeeper:3.4.6 | | | +-log4j:log4j:1.2.17 | | | +-org.slf4j:slf4j-log4j12:1.7.5 | | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-prefix-tree:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-procedure:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-protocol:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 | +-org.apache.hbase:hbase-protocol:1.2.2 | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.apache.hbase:hbase-annotations:1.2.2 | | +-log4j:log4j:1.2.17 | +-org.apache.zookeeper:zookeeper:3.4.6 | | +-log4j:log4j:1.2.17 | | +-org.slf4j:slf4j-log4j12:1.7.5 | | +-log4j:log4j:1.2.17 | +-org.owasp.esapi:esapi:2.1.0.1 | | +-commons-beanutils:commons-beanutils-core:1.8.3 | | | +-commons-logging:commons-logging:1.2 | | +-commons-configuration:commons-configuration:1.10 | | | +-commons-logging:commons-logging:1.2 | | +-log4j:log4j:1.2.17 | | +-org.owasp.antisamy:antisamy:1.5.3 | | | +-commons-httpclient:commons-httpclient:3.1 | | | | +-commons-logging:commons-logging:1.2 | +-tomcat:jasper-runtime:5.5.23 | +-commons-el:commons-el:1.0 | +-commons-logging:commons-logging:1.2 +-org.hbase:asynchbase:1.7.2 | +-org.apache.zookeeper:zookeeper:3.4.6 | | +-log4j:log4j:1.2.17 | | +-org.slf4j:slf4j-log4j12:1.7.5 | | +-log4j:log4j:1.2.17 | +-org.slf4j:log4j-over-slf4j:1.7.7 {noformat} (correcting myself - asynchbase does not use logback; so the play! will be the only problem if it forces us to use logback.) So for s2core and other library subprojects, my plan is to do the following: * exclude log4j and commons-logging from hbase/asynchbase dependencies * add log4j-over-slf4j, jcl-over-slf4j, log4j, slf4j-log4j12 as runtime dependencies I'll update on how we should deal with playframework. PS: commons-logging is a failed attempt by Jakarta (which was absorbed to ASF) to make what SLF4j eventually became, and jcl-over-slf4j will forward any JCL invocations to SLF4j. > Cleaner logging library usage > ----------------------------- > > Key: S2GRAPH-117 > URL: https://issues.apache.org/jira/browse/S2GRAPH-117 > Project: S2Graph > Issue Type: Improvement > Reporter: Jong Wook Kim > Fix For: 0.1.0 > > Original Estimate: 336h > Remaining Estimate: 336h > > Our SBT project is currently dependent on both log4j and logback, while using > two logging backends is not ideal. > Furthermore, there has been report that in some configuration we have both > slf4j-log4j12 and log4j-over-slf4j in the classpath which leads to > StackOverflowError. > The current codebase is not written with a clean usage of logging library in > mind, and I propose the following improvements to make our logging usage > conform with the de-facto standard of slf4j. > - Figure out how the dependencies are using slf4j, log4j, and logback. > - Use slf4j-api everywhere, named with the fully qualified class names. > - Exclude slf4j backends from the library projects > - Add either log4j or logback backends to the application projects, > preferably log4j. > - Add a test case checking that the classpath has the correct configuration > of jars. -- This message was sent by Atlassian JIRA (v6.3.4#6332)