accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1301471 - /incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
Date Fri, 16 Mar 2012 12:52:58 GMT
Author: ecn
Date: Fri Mar 16 12:52:58 2012
New Revision: 1301471

URL: http://svn.apache.org/viewvc?rev=1301471&view=rev
Log:
ACCUMULO-407: add dynamic log4j reconfiguration

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1301471&r1=1301470&r2=1301471&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
Fri Mar 16 12:52:58 2012
@@ -40,6 +40,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction;
 import org.apache.log4j.Logger;
+import org.apache.log4j.PropertyConfigurator;
 import org.apache.log4j.helpers.LogLog;
 import org.apache.log4j.xml.DOMConfigurator;
 import org.apache.zookeeper.KeeperException;
@@ -122,7 +123,11 @@ public class Accumulo {
     LogLog.setQuietMode(true);
     
     // Configure logging
-    DOMConfigurator.configure(logConfig);
+    DOMConfigurator.configureAndWatch(logConfig, 5000);
+    
+    // General purpose logging control independent from specific component log config
+    String propertyLogConfig = String.format("%s/conf/log4j.properties", System.getenv("ACCUMULO_HOME"));
+    PropertyConfigurator.configureAndWatch(propertyLogConfig, 5000);
     
     log.info(application + " starting");
     log.info("Instance " + HdfsZooInstance.getInstance().getInstanceID());



Mime
View raw message