[jira] [Commented] (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058751#comment-13058751 ] Jonathan Ellis commented on CASSANDRA-803: -- bq. I'd be happy to rip out all the log4j specific stuff and replace it with slf4j if that patch would be used. Sure, as long as the log4j-based defaults continue to work. Related: CASSANDRA-2383 remove PropertyConfigurator from CassandraDaemon Key: CASSANDRA-803 URL: https://issues.apache.org/jira/browse/CASSANDRA-803 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.6 Reporter: Jesse McConnell In order for users to make use of the EmbeddedCassandraService for unit testing they need to have a dependency declared on log4j. It would be nice if we could use the log4j-over-slf4j artifact to bridge this requirement for those of us using slf4j. http://www.slf4j.org/legacy.html#log4j-over-slf4j Currently it errors with the direct usage of the PropertyConfigurator in o.a.c.thrift.CassandraDaemon. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13058209#comment-13058209 ] Marshall Pierce commented on CASSANDRA-803: --- It's a shame to add a hard dep on log4j for this, especially when both dynamically reloading configs and the thing that caused the use of PropertyConfigurator to get back in (CASSANDRA-1525, configuring via JMX) are already handled natively by Logback without any in-code configuration. (http://logback.qos.ch/manual/configuration.html#autoScan and http://logback.qos.ch/manual/jmxConfig.html). I'm happy to contribute a patch. What about simply making that static initializer block short-circuit if log4j isn't there? It's kind of hackish but it does the job. I'd be happy to rip out all the log4j specific stuff and replace it with slf4j if that patch would be used. remove PropertyConfigurator from CassandraDaemon Key: CASSANDRA-803 URL: https://issues.apache.org/jira/browse/CASSANDRA-803 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.6 Reporter: Jesse McConnell In order for users to make use of the EmbeddedCassandraService for unit testing they need to have a dependency declared on log4j. It would be nice if we could use the log4j-over-slf4j artifact to bridge this requirement for those of us using slf4j. http://www.slf4j.org/legacy.html#log4j-over-slf4j Currently it errors with the direct usage of the PropertyConfigurator in o.a.c.thrift.CassandraDaemon. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13024788#comment-13024788 ] Jonathan Ellis commented on CASSANDRA-803: -- It was added back for CASSANDRA-1525 remove PropertyConfigurator from CassandraDaemon Key: CASSANDRA-803 URL: https://issues.apache.org/jira/browse/CASSANDRA-803 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.6 Reporter: Jesse McConnell In order for users to make use of the EmbeddedCassandraService for unit testing they need to have a dependency declared on log4j. It would be nice if we could use the log4j-over-slf4j artifact to bridge this requirement for those of us using slf4j. http://www.slf4j.org/legacy.html#log4j-over-slf4j Currently it errors with the direct usage of the PropertyConfigurator in o.a.c.thrift.CassandraDaemon. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13023636#comment-13023636 ] Oleg Tsvinev commented on CASSANDRA-803: I see PropertyConfigurator still there, as of version 0.7.4. public abstract class AbstractCassandraDaemon implements CassandraDaemon { //Initialize logging in such a way that it checks for config changes every 10 seconds. static { String config = System.getProperty(log4j.configuration, log4j-server.properties); URL configLocation = null; try { // try loading from a physical location first. configLocation = new URL(config); } catch (MalformedURLException ex) { // load from the classpath. configLocation = AbstractCassandraDaemon.class.getClassLoader().getResource(config); if (configLocation == null) throw new RuntimeException(Couldn't figure out log4j configuration.); } ---PropertyConfigurator.configureAndWatch(configLocation.getFile(), 1); org.apache.log4j.Logger.getLogger(AbstractCassandraDaemon.class).info(Logging initialized); } private static Logger logger = LoggerFactory.getLogger(AbstractCassandraDaemon.class); remove PropertyConfigurator from CassandraDaemon Key: CASSANDRA-803 URL: https://issues.apache.org/jira/browse/CASSANDRA-803 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.6 Reporter: Jesse McConnell In order for users to make use of the EmbeddedCassandraService for unit testing they need to have a dependency declared on log4j. It would be nice if we could use the log4j-over-slf4j artifact to bridge this requirement for those of us using slf4j. http://www.slf4j.org/legacy.html#log4j-over-slf4j Currently it errors with the direct usage of the PropertyConfigurator in o.a.c.thrift.CassandraDaemon. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon
[ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12903827#action_12903827 ] Carsten Krebs commented on CASSANDRA-803: - As far I can see, the {{PropertyConfigurator}} is already removed with rev 934505 for CASSANDRA-971 . Though {{org.apache.cassandra.service.StorageService#setLog4jLevel}} has another dependency to _log4j_, which will probably cause the same problems when using _log4j-over-sl4j_. I don't know how to cope with this. What's the strategy regarding the log4j dependencies? * Should all log4j dependencies be removed from the cassandra code base and thus in turn {{org.apache.cassandra.service.StorageServiceMBean#setLog4jLevel}} and all of it's implementations * {{setLog4jLevel}} should be kept, but as some kind of optional operation, just in the case that log4j is present * Stay completely with log4j? remove PropertyConfigurator from CassandraDaemon Key: CASSANDRA-803 URL: https://issues.apache.org/jira/browse/CASSANDRA-803 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 0.6 Reporter: Jesse McConnell In order for users to make use of the EmbeddedCassandraService for unit testing they need to have a dependency declared on log4j. It would be nice if we could use the log4j-over-slf4j artifact to bridge this requirement for those of us using slf4j. http://www.slf4j.org/legacy.html#log4j-over-slf4j Currently it errors with the direct usage of the PropertyConfigurator in o.a.c.thrift.CassandraDaemon. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.