[exo-jcr-commits] exo-jcr SVN: r3416 - in kernel/branches/2.2.x/exo.kernel.commons: src/main/java/org/exoplatform/services/log/impl and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 10 04:03:30 EST 2010


Author: dkuleshov
Date: 2010-11-10 04:03:28 -0500 (Wed, 10 Nov 2010)
New Revision: 3416

Modified:
   kernel/branches/2.2.x/exo.kernel.commons/pom.xml
   kernel/branches/2.2.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java
Log:
JCR-1495: dependencies scope changed

Modified: kernel/branches/2.2.x/exo.kernel.commons/pom.xml
===================================================================
--- kernel/branches/2.2.x/exo.kernel.commons/pom.xml	2010-11-09 16:00:02 UTC (rev 3415)
+++ kernel/branches/2.2.x/exo.kernel.commons/pom.xml	2010-11-10 09:03:28 UTC (rev 3416)
@@ -54,7 +54,6 @@
       <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
-         <scope>compile</scope>
       </dependency>
    </dependencies>
 </project>

Modified: kernel/branches/2.2.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java
===================================================================
--- kernel/branches/2.2.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java	2010-11-09 16:00:02 UTC (rev 3415)
+++ kernel/branches/2.2.x/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java	2010-11-10 09:03:28 UTC (rev 3416)
@@ -18,9 +18,9 @@
  */
 package org.exoplatform.services.log.impl;
 
-import org.apache.log4j.PropertyConfigurator;
 import org.exoplatform.services.log.AbstractLogConfigurator;
 
+import java.lang.reflect.Method;
 import java.util.Properties;
 
 /**
@@ -31,13 +31,21 @@
  * @author <a href="mailto:gennady.azarenkov at exoplatform.com">Gennady Azarenkov</a>
  * @version $Id: Log4JConfigurator.java 34394 2009-07-23 09:23:31Z dkatayev $
  */
+
 public class Log4JConfigurator extends AbstractLogConfigurator
 {
-
    public void configure(Properties properties)
    {
-      PropertyConfigurator.configure(properties);
+      try
+      {
+         Class<?> propertyConfiguratorClass = Class.forName("org.apache.log4j.PropertyConfigurator");
+         Method m = propertyConfiguratorClass.getMethod("configure", Properties.class);
+         m.invoke(null, properties);
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+      }
       this.properties = properties;
    }
-
-}
+}
\ No newline at end of file



More information about the exo-jcr-commits mailing list