[jira] [Commented] (CASSANDRA-803) remove PropertyConfigurator from CassandraDaemon

2011-04-24 Thread Oleg Tsvinev (JIRA)

[ 
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-971) simplify configuration file loading

2011-04-24 Thread Oleg Tsvinev (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13023638#comment-13023638
 ] 

Oleg Tsvinev commented on CASSANDRA-971:


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);



 simplify configuration file loading
 ---

 Key: CASSANDRA-971
 URL: https://issues.apache.org/jira/browse/CASSANDRA-971
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7 beta 1

 Attachments: 971.txt


 Currently we can load the configuration file from (a) a full path specified 
 by -Dstorage-config, or (b) storage.conf.xml located anywhere on the 
 classpath (filename may not be changed).
 I think we should figure out what The Right Thing is to do here, and then do 
 it, instead of trying multiple guesses in an effort to prevent ... what?
 ISTM that the java idiom here is, look for a default filename on the 
 classpath, and allow customizing that name w/ a system property, but when 
 taking the property ONLY the filename is customized, not the full path.  This 
 is what log4j does, for instance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira