You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Oleg Tsvinev (JIRA)" <ji...@apache.org> on 2011/04/24 08:45:06 UTC

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

    [ https://issues.apache.org/jira/browse/CASSANDRA-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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(), 10000);
        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