ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sath...@apache.org
Subject [1/5] ode git commit: ODE-983: Migrated to SLF4J and Log4j2
Date Thu, 26 Nov 2015 09:25:08 GMT
Repository: ode
Updated Branches:
  refs/heads/master 536e52a59 -> 573900b72


http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/OdeSUManager.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/OdeSUManager.java b/jbi/src/main/java/org/apache/ode/jbi/OdeSUManager.java
index 8ff9a3f..7e6dfef 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/OdeSUManager.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/OdeSUManager.java
@@ -27,8 +27,8 @@ import javax.jbi.management.DeploymentException;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -36,7 +36,7 @@ import org.apache.ode.utils.DOMUtils;
 import org.apache.ode.utils.XMLParserUtils;
 
 public class OdeSUManager implements ServiceUnitManager {
-  private static final Log __log = LogFactory.getLog(OdeSUManager.class);
+  private static final Logger __log = LoggerFactory.getLogger(OdeSUManager.class);
 
   private static final Messages __msgs = Messages.getMessages(Messages.class);
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/OdeService.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/OdeService.java b/jbi/src/main/java/org/apache/ode/jbi/OdeService.java
index 6f2be7e..699b752 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/OdeService.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/OdeService.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.jbi;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.bpel.iapi.Endpoint;
 import org.apache.ode.bpel.iapi.Message;
 import org.apache.ode.bpel.iapi.MessageExchange;
@@ -47,7 +47,7 @@ import java.util.Map;
  */
 public class OdeService extends ServiceBridge implements JbiMessageExchangeProcessor {
 
-    private static final Log __log = LogFactory.getLog(OdeService.class);
+    private static final Logger __log = LoggerFactory.getLogger(OdeService.class);
 
     /** utility for tracking outstanding JBI message exchanges. */
     private final JbiMexTracker _jbiMexTracker = new JbiMexTracker();
@@ -118,7 +118,7 @@ public class OdeService extends ServiceBridge implements JbiMessageExchangeProce
     public void onJbiMessageExchange(javax.jbi.messaging.MessageExchange jbiMex) throws MessagingException {
         if (jbiMex.getRole() != javax.jbi.messaging.MessageExchange.Role.PROVIDER) {
             String errmsg = "Message exchange is not in PROVIDER role as expected: " + jbiMex.getExchangeId();
-            __log.fatal(errmsg);
+            __log.error(errmsg);
             throw new IllegalArgumentException(errmsg);
         }
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/OdeServiceUnit.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/OdeServiceUnit.java b/jbi/src/main/java/org/apache/ode/jbi/OdeServiceUnit.java
index a497c17..829ca1d 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/OdeServiceUnit.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/OdeServiceUnit.java
@@ -31,15 +31,15 @@ import java.util.List;
 import javax.jbi.management.DeploymentException;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Representation of a JBI service unit. A JBI service unit may actually consist
  * of multiple processes.
  */
 class OdeServiceUnit {
-    private static final Log __log = LogFactory.getLog(OdeServiceUnit.class);
+    private static final Logger __log = LoggerFactory.getLogger(OdeServiceUnit.class);
 
     private static final Messages __msgs = Messages.getMessages(Messages.class);
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/Receiver.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/Receiver.java b/jbi/src/main/java/org/apache/ode/jbi/Receiver.java
index d3f93f8..066349d 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/Receiver.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/Receiver.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.jbi;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jbi.messaging.DeliveryChannel;
 import javax.jbi.messaging.MessageExchange;
@@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
  * Receiver pulls messages from the NMS and submits them to ODE for further processing.
  */
 public class Receiver implements Runnable {
-    private static final Log __log = LogFactory.getLog(Receiver.class);
+    private static final Logger __log = LoggerFactory.getLogger(Receiver.class);
 
     // default time to wait for MessageExchanges, in seconds
     private static final long ACCEPT_TIMEOUT = 1L;
@@ -111,7 +111,7 @@ public class Receiver implements Runnable {
 
                 // If it's not dead yet, we got a problem we can't deal with.
                 if (_thread.isAlive()) {
-                    __log.fatal("Receiver thread is not dying gracefully despite our insistence!.");
+                    __log.error("Receiver thread is not dying gracefully despite our insistence!.");
                 }
 
                 // In any case, next step is to shutdown the thread pool
@@ -150,11 +150,11 @@ public class Receiver implements Runnable {
         try {
             _channel = _odeContext.getContext().getDeliveryChannel();
             if (_channel == null) {
-                __log.fatal("No Channel!");
+                __log.error("No Channel!");
                 return;
             }
         } catch (MessagingException ex) {
-            __log.fatal("Error getting channel! ", ex);
+            __log.error("Error getting channel! ", ex);
             return;
         }
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/ServiceBridge.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/ServiceBridge.java b/jbi/src/main/java/org/apache/ode/jbi/ServiceBridge.java
index eab3119..ee098a8 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/ServiceBridge.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/ServiceBridge.java
@@ -22,8 +22,8 @@ import java.util.Set;
 
 import javax.jbi.messaging.NormalizedMessage;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.bpel.iapi.MessageExchange;
 import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
 import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
@@ -36,7 +36,7 @@ import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
  */
 public class ServiceBridge {
 
-    private static final Log __log = LogFactory.getLog(ServiceBridge.class);
+    private static final Logger __log = LoggerFactory.getLogger(ServiceBridge.class);
 
     /**
      * Transfer message properties from the ODE message exchange to the JBI message exchange object.

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/msgmap/BaseXmlMapper.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/msgmap/BaseXmlMapper.java b/jbi/src/main/java/org/apache/ode/jbi/msgmap/BaseXmlMapper.java
index 66ecf61..6103c4f 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/msgmap/BaseXmlMapper.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/msgmap/BaseXmlMapper.java
@@ -25,14 +25,14 @@ import java.util.WeakHashMap;
 
 import javax.xml.transform.Source;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.DOMUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 public abstract class BaseXmlMapper {
-    protected Log __log = LogFactory.getLog(getClass());
+    protected Logger __log = LoggerFactory.getLogger(getClass());
 
     /** Cache of the parsed messages. */
     private static Map<Source, Document> __parsed = Collections.synchronizedMap(new WeakHashMap<Source, Document>());

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/util/SchemaCollection.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/util/SchemaCollection.java b/jbi/src/main/java/org/apache/ode/jbi/util/SchemaCollection.java
index 6b26a77..e8aaaa2 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/util/SchemaCollection.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/util/SchemaCollection.java
@@ -27,8 +27,8 @@ import java.util.Map;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.XMLParserUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -43,7 +43,7 @@ import org.xml.sax.InputSource;
  */
 public class SchemaCollection {
 
-    private static Log log = LogFactory.getLog(SchemaCollection.class);
+    private static Logger log = LoggerFactory.getLogger(SchemaCollection.class);
 
     private Map schemas;
     private URI baseUri;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/main/java/org/apache/ode/jbi/util/WSDLFlattener.java
----------------------------------------------------------------------
diff --git a/jbi/src/main/java/org/apache/ode/jbi/util/WSDLFlattener.java b/jbi/src/main/java/org/apache/ode/jbi/util/WSDLFlattener.java
index d73e6d4..85edebb 100644
--- a/jbi/src/main/java/org/apache/ode/jbi/util/WSDLFlattener.java
+++ b/jbi/src/main/java/org/apache/ode/jbi/util/WSDLFlattener.java
@@ -38,14 +38,14 @@ import javax.wsdl.extensions.schema.SchemaImport;
 import javax.wsdl.factory.WSDLFactory;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.ibm.wsdl.extensions.schema.SchemaImpl;
 
 public class WSDLFlattener {
 
-    private static Log __log = LogFactory.getLog(WSDLFlattener.class);
+    private static Logger __log = LoggerFactory.getLogger(WSDLFlattener.class);
 
     private Definition _definition;
     private SchemaCollection _schemas;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
----------------------------------------------------------------------
diff --git a/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java b/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
index 6b56ab7..97ec81c 100644
--- a/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
+++ b/jbi/src/test/java/org/apache/ode/jbi/JbiTestBase.java
@@ -37,8 +37,8 @@ import javax.transaction.TransactionManager;
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.servicemix.client.DefaultServiceMixClient;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.JBIContainer;
@@ -53,7 +53,7 @@ import org.springframework.context.support.AbstractXmlApplicationContext;
 
 @Ignore
 public class JbiTestBase extends SpringTestSupport {
-    private static Log log = LogFactory.getLog(JbiTestBase.class);
+    private static Logger log = LoggerFactory.getLogger(JbiTestBase.class);
 
     protected OdeComponent odeComponent;
     protected JBIContainer jbiContainer;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/test/java/org/apache/ode/jbi/msgmap/JbiWsdl11WrapperMapperTest.java
----------------------------------------------------------------------
diff --git a/jbi/src/test/java/org/apache/ode/jbi/msgmap/JbiWsdl11WrapperMapperTest.java b/jbi/src/test/java/org/apache/ode/jbi/msgmap/JbiWsdl11WrapperMapperTest.java
index 91de1f0..63a378c 100644
--- a/jbi/src/test/java/org/apache/ode/jbi/msgmap/JbiWsdl11WrapperMapperTest.java
+++ b/jbi/src/test/java/org/apache/ode/jbi/msgmap/JbiWsdl11WrapperMapperTest.java
@@ -30,12 +30,12 @@ import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.DOMUtils;
 
 public class JbiWsdl11WrapperMapperTest extends junit.framework.TestCase {
-    private static Log __log = LogFactory.getLog(JbiWsdl11WrapperMapperTest.class);
+    private static Logger __log = LoggerFactory.getLogger(JbiWsdl11WrapperMapperTest.class);
 
     public static class MockJbiFault implements javax.jbi.messaging.Fault {
         private String resourceName;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jbi/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/jbi/src/test/resources/log4j2.xml b/jbi/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..9f6bc53
--- /dev/null
+++ b/jbi/src/test/resources/log4j2.xml
@@ -0,0 +1,37 @@
+<Configuration>
+    <Appenders>
+        <File name="FILE" fileName="target/test/test.log" append="false">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </File>
+        <Console name="STDOUT" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </Console>
+        <Async name="Async">
+            <AppenderRef ref="FILE"/>
+            <AppenderRef ref="STDOUT"/>
+        </Async>
+    </Appenders>
+
+    <Loggers>
+        <Logger name="org.apache.ode" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.axis2" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+       <Logger name="org.hibernate" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.openjpa" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.springframework" level="error" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+
+        <Root level="info">
+            <AppenderRef ref="Async"/>
+        </Root>
+    </Loggers>
+
+</Configuration>

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/jca-server/src/main/java/org/apache/ode/jca/server/rmi/RmiTransportServerImpl.java
----------------------------------------------------------------------
diff --git a/jca-server/src/main/java/org/apache/ode/jca/server/rmi/RmiTransportServerImpl.java b/jca-server/src/main/java/org/apache/ode/jca/server/rmi/RmiTransportServerImpl.java
index e5bad62..6520e1a 100644
--- a/jca-server/src/main/java/org/apache/ode/jca/server/rmi/RmiTransportServerImpl.java
+++ b/jca-server/src/main/java/org/apache/ode/jca/server/rmi/RmiTransportServerImpl.java
@@ -26,8 +26,8 @@ import java.rmi.server.UnicastRemoteObject;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.jca.server.ConnectionProvider;
 import org.apache.ode.ra.transports.rmi.OdeRemote;
 import org.apache.ode.ra.transports.rmi.OdeTransportPipeRemote;
@@ -37,7 +37,7 @@ import org.apache.ode.ra.transports.rmi.OdeTransportPipeRemote;
  * "pipes", each represented by its own remote object.
  */
 public class RmiTransportServerImpl implements OdeRemote {
-    private static final Log __log = LogFactory.getLog(RmiTransportServerImpl.class);
+    private static final Logger __log = LoggerFactory.getLogger(RmiTransportServerImpl.class);
 
     private List<RmiPipeServerImpl> _pipes = new ArrayList<RmiPipeServerImpl>();
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
----------------------------------------------------------------------
diff --git a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
index b3e7936..b255e08 100644
--- a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
+++ b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/JdbcDelegate.java
@@ -42,8 +42,8 @@ import org.apache.ode.bpel.iapi.Scheduler;
 import org.apache.ode.bpel.iapi.Scheduler.JobDetails;
 import org.apache.ode.utils.DbIsolation;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.DbIsolation;
 import org.apache.ode.utils.StreamUtils;
 
@@ -55,7 +55,7 @@ import org.apache.ode.utils.StreamUtils;
  */
 public class JdbcDelegate implements DatabaseDelegate {
 
-    private static final Log __log = LogFactory.getLog(JdbcDelegate.class);
+    private static final Logger __log = LoggerFactory.getLogger(JdbcDelegate.class);
 
     private static final String DELETE_JOB = "delete from ODE_JOB where jobid = ? and nodeid = ?";
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SchedulerThread.java
----------------------------------------------------------------------
diff --git a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SchedulerThread.java b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SchedulerThread.java
index 9410791..5849f3e 100644
--- a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SchedulerThread.java
+++ b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SchedulerThread.java
@@ -24,8 +24,8 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.stl.CollectionsX;
 import org.apache.ode.utils.stl.MemberOfFunction;
 
@@ -38,7 +38,7 @@ import org.apache.ode.utils.stl.MemberOfFunction;
  */
 class SchedulerThread implements Runnable {
 
-    private static final Log __log = LogFactory.getLog(SchedulerThread.class);
+    private static final Logger __log = LoggerFactory.getLogger(SchedulerThread.class);
 
     private static final int TODO_QUEUE_INITIAL_CAPACITY = 200;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java
----------------------------------------------------------------------
diff --git a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java
index 517045d..306a9fb 100644
--- a/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java
+++ b/scheduler-simple/src/main/java/org/apache/ode/scheduler/simple/SimpleScheduler.java
@@ -19,8 +19,8 @@
 
 package org.apache.ode.scheduler.simple;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.bpel.clapi.ClusterManager;
 import org.apache.ode.bpel.clapi.ClusterMemberListener;
 import org.apache.ode.bpel.iapi.ContextException;
@@ -54,7 +54,7 @@ import java.util.concurrent.atomic.AtomicLong;
  *
  */
 public class SimpleScheduler implements Scheduler, TaskRunner, ClusterMemberListener {
-    private static final Log __log = LogFactory.getLog(SimpleScheduler.class);
+    private static final Logger __log = LoggerFactory.getLogger(SimpleScheduler.class);
 
     private static final int DEFAULT_TRANSACTION_TIMEOUT = 60 * 1000;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/RetriesTest.java
----------------------------------------------------------------------
diff --git a/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/RetriesTest.java b/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/RetriesTest.java
index 3872664..85778db 100644
--- a/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/RetriesTest.java
+++ b/scheduler-simple/src/test/java/org/apache/ode/scheduler/simple/RetriesTest.java
@@ -20,8 +20,8 @@
 package org.apache.ode.scheduler.simple;
 
 import org.apache.ode.bpel.iapi.Scheduler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.junit.After;
 import org.junit.Before;
@@ -38,7 +38,7 @@ import junit.framework.TestCase;
  * @author Matthieu Riou <mriou@apache.org>
  */
 public class RetriesTest extends Assert implements Scheduler.JobProcessor {
-    private static final Log __log = LogFactory.getLog(RetriesTest.class);
+    private static final Logger __log = LoggerFactory.getLogger(RetriesTest.class);
 
     DelegateSupport _ds;
     SimpleScheduler _scheduler;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/scheduler-simple/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/scheduler-simple/src/test/resources/log4j2.xml b/scheduler-simple/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..9f6bc53
--- /dev/null
+++ b/scheduler-simple/src/test/resources/log4j2.xml
@@ -0,0 +1,37 @@
+<Configuration>
+    <Appenders>
+        <File name="FILE" fileName="target/test/test.log" append="false">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </File>
+        <Console name="STDOUT" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </Console>
+        <Async name="Async">
+            <AppenderRef ref="FILE"/>
+            <AppenderRef ref="STDOUT"/>
+        </Async>
+    </Appenders>
+
+    <Loggers>
+        <Logger name="org.apache.ode" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.axis2" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+       <Logger name="org.hibernate" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.openjpa" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.springframework" level="error" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+
+        <Root level="info">
+            <AppenderRef ref="Async"/>
+        </Root>
+    </Loggers>
+
+</Configuration>

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/tools/src/main/java/org/apache/ode/tools/ClineCommandContext.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/ode/tools/ClineCommandContext.java b/tools/src/main/java/org/apache/ode/tools/ClineCommandContext.java
index 4532c4a..228bf5b 100644
--- a/tools/src/main/java/org/apache/ode/tools/ClineCommandContext.java
+++ b/tools/src/main/java/org/apache/ode/tools/ClineCommandContext.java
@@ -18,13 +18,13 @@
  */
 package org.apache.ode.tools;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 public class ClineCommandContext implements CommandContext {
 
-  private Log _log;
+  private Logger _log;
 
-  public ClineCommandContext(Log l) {
+  public ClineCommandContext(Logger l) {
     _log = l;
   }
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/tools/src/main/java/org/apache/ode/tools/CommandContext.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/ode/tools/CommandContext.java b/tools/src/main/java/org/apache/ode/tools/CommandContext.java
index 22e4bcd..660979a 100644
--- a/tools/src/main/java/org/apache/ode/tools/CommandContext.java
+++ b/tools/src/main/java/org/apache/ode/tools/CommandContext.java
@@ -52,46 +52,46 @@ public interface CommandContext {
   public void errln(String s);
 
   /**
-   * Log an error.
+   * Logger an error.
    * @param s a descriptive message.
    */
   public void error(String s);
 
   /**
-   * Log an error that resulted from a {@link Throwable}.
+   * Logger an error that resulted from a {@link Throwable}.
    * @param s a descriptive message.
    * @param t the cause.
    */
   public void error(String s, Throwable t);
 
   /**
-   * Log a warning that resulted from a {@link Throwable}
+   * Logger a warning that resulted from a {@link Throwable}
    * @param s
    * @param t
    */
   public void warn(String s, Throwable t);
 
   /**
-   * Log a warning.
+   * Logger a warning.
    * @param s a descriptive message.
    */
   public void warn(String s);
 
   /**
-   * Log an informative message.
+   * Logger an informative message.
    * @param s a descriptive message.
    */
   public void info(String s);
 
   /**
-   * Log an informative message that resulted from a {@link Throwable}.
+   * Logger an informative message that resulted from a {@link Throwable}.
    * @param s a descriptive message.
    * @param t the cause.
    */
   public void info(String s, Throwable t);
 
   /**
-   * Log a debug-level message that resulted from a {@link Throwable}.
+   * Logger a debug-level message that resulted from a {@link Throwable}.
    * @param s a descriptive message.
    * @param t the cause.
    */
@@ -99,7 +99,7 @@ public interface CommandContext {
   public void debug(String s, Throwable t);
 
   /**
-   * Log an debug-level message.
+   * Logger an debug-level message.
    * @param s a descriptive message.
    */
   public void debug(String s);

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/tools/src/main/java/org/apache/ode/tools/bpelc/cline/BpelC.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/ode/tools/bpelc/cline/BpelC.java b/tools/src/main/java/org/apache/ode/tools/bpelc/cline/BpelC.java
index 4d4831c..194cb88 100644
--- a/tools/src/main/java/org/apache/ode/tools/bpelc/cline/BpelC.java
+++ b/tools/src/main/java/org/apache/ode/tools/bpelc/cline/BpelC.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.tools.bpelc.cline;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.tools.ClineCommandContext;
 import org.apache.ode.tools.ExecutionException;
 import org.apache.ode.tools.bpelc.BpelCompileCommand;
@@ -33,7 +33,7 @@ import org.apache.ode.utils.cli.MultiArgument;
 import java.io.File;
 
 public class BpelC extends BaseCommandlineTool {
-    private static final Log __log = LogFactory.getLog(BpelC.class);
+    private static final Logger __log = LoggerFactory.getLogger(BpelC.class);
 
     private static FlagWithArgument OUTPUT_DIR = new FlagWithArgument("od","directory",
             "output directory",true);

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/DOMUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/DOMUtils.java b/utils/src/main/java/org/apache/ode/utils/DOMUtils.java
index c2a795d..854a8bc 100644
--- a/utils/src/main/java/org/apache/ode/utils/DOMUtils.java
+++ b/utils/src/main/java/org/apache/ode/utils/DOMUtils.java
@@ -50,8 +50,8 @@ import javax.xml.transform.stream.StreamSource;
 
 import net.sf.saxon.om.Name11Checker;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.sax.LoggingErrorHandler;
 import org.apache.xerces.dom.DOMOutputImpl;
 import org.apache.xerces.impl.Constants;
@@ -77,7 +77,7 @@ import org.xml.sax.SAXException;
  */
 public class DOMUtils {
 
-    private static Log __log = LogFactory.getLog(DOMUtils.class);
+    private static Logger __log = LoggerFactory.getLogger(DOMUtils.class);
 
     /** The namespaceURI represented by the prefix <code>xmlns</code>. */
     public static final String NS_URI_XMLNS = "http://www.w3.org/2000/xmlns/";
@@ -1041,7 +1041,7 @@ public class DOMUtils {
                 txer = _transformerFactory.newTransformer();
             } catch (TransformerConfigurationException e) {
                 String errmsg = "Transformer configuration error!";
-                __log.fatal(errmsg, e);
+                __log.error(errmsg, e);
                 throw new Error(errmsg, e);
             }
         }
@@ -1058,7 +1058,7 @@ public class DOMUtils {
                     builder = __documentBuilderFactory.newDocumentBuilder();
                     builder.setErrorHandler(new LoggingErrorHandler());
                 } catch (ParserConfigurationException e) {
-                    __log.error(e);
+                    __log.error("",e);
                     throw new RuntimeException(e);
                 }
             }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/DbIsolation.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/DbIsolation.java b/utils/src/main/java/org/apache/ode/utils/DbIsolation.java
index 935a58d..7003063 100644
--- a/utils/src/main/java/org/apache/ode/utils/DbIsolation.java
+++ b/utils/src/main/java/org/apache/ode/utils/DbIsolation.java
@@ -23,14 +23,14 @@ import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.DataSource;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Utility to set Ode-specific isolation level on DataSource connections.
  */
 public class DbIsolation {
-    private static final Log __log = LogFactory.getLog(DbIsolation.class);
+    private static final Logger __log = LoggerFactory.getLogger(DbIsolation.class);
     private static int _isolationLevel;
 
     // Read Ode-specific isolation level configuration

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java b/utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java
index b393f95..2ae9e4b 100644
--- a/utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java
+++ b/utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java
@@ -20,8 +20,8 @@
 package org.apache.ode.utils;
 
 import org.apache.commons.collections.map.MultiKeyMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.commons.lang.StringUtils;
 
 import javax.xml.namespace.QName;
@@ -80,7 +80,7 @@ import java.util.regex.Pattern;
  */
 public class HierarchicalProperties {
 
-    private static final Log log = LogFactory.getLog(HierarchicalProperties.class);
+    private static final Logger log = LoggerFactory.getLogger(HierarchicalProperties.class);
 
     public static final String ODE_PREFFIX = "ode";
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/LoggingInterceptor.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/LoggingInterceptor.java b/utils/src/main/java/org/apache/ode/utils/LoggingInterceptor.java
index 3a11973..affb888 100644
--- a/utils/src/main/java/org/apache/ode/utils/LoggingInterceptor.java
+++ b/utils/src/main/java/org/apache/ode/utils/LoggingInterceptor.java
@@ -29,7 +29,7 @@ import java.util.*;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 public class LoggingInterceptor<T> implements InvocationHandler {
 
@@ -54,13 +54,13 @@ public class LoggingInterceptor<T> implements InvocationHandler {
         PARAMSTYPES.add("setURL");
     }
 
-    private Log _log;
+    private Logger _log;
     private T _delegate;
     private Map<String, Object> _paramsByName = new TreeMap<String, Object>();
     private Map<Integer, Object> _paramsByIdx = new TreeMap<Integer, Object>();
 
 
-    public LoggingInterceptor(T delegate, Log log) {
+    public LoggingInterceptor(T delegate, Logger log) {
         _log = log;
         _delegate = delegate;
     }
@@ -166,7 +166,7 @@ public class LoggingInterceptor<T> implements InvocationHandler {
         else System.out.println(str);
     }
 
-    public static DataSource createLoggingDS(DataSource ds, Log log) {
+    public static DataSource createLoggingDS(DataSource ds, Logger log) {
         return (DataSource)Proxy.newProxyInstance(ds.getClass().getClassLoader(),
                 new Class[] {DataSource.class}, new LoggingInterceptor<DataSource>(ds,log));
     }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/NSContext.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/NSContext.java b/utils/src/main/java/org/apache/ode/utils/NSContext.java
index 86a183a..26109ca 100644
--- a/utils/src/main/java/org/apache/ode/utils/NSContext.java
+++ b/utils/src/main/java/org/apache/ode/utils/NSContext.java
@@ -34,8 +34,8 @@ import java.util.Set;
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.stl.CollectionsX;
 import org.apache.ode.utils.stl.CompositeUnaryFunction;
 import org.apache.ode.utils.stl.EqualsUnaryFunction;
@@ -54,7 +54,7 @@ public class NSContext implements NamespaceContext, Externalizable {
     private static final long serialVersionUID = 1L;
 
     /** Class-level logger. */
-    private static final Log __log = LogFactory.getLog(NSContext.class);
+    private static final Logger __log = LoggerFactory.getLogger(NSContext.class);
 
     /** Prefix-to-URI map. */
     private HashMap<String, String> _prefixToUriMap = new HashMap<String, String>() {

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/Properties.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/Properties.java b/utils/src/main/java/org/apache/ode/utils/Properties.java
index b7ca983..c283548 100644
--- a/utils/src/main/java/org/apache/ode/utils/Properties.java
+++ b/utils/src/main/java/org/apache/ode/utils/Properties.java
@@ -35,8 +35,8 @@ import org.apache.commons.httpclient.params.HttpClientParams;
 import org.apache.commons.httpclient.params.HttpConnectionParams;
 import org.apache.commons.httpclient.params.HttpMethodParams;
 import org.apache.commons.httpclient.params.HttpParams;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -94,7 +94,7 @@ public class Properties {
     public static final String PROP_SEND_WS_ADDRESSING_HEADERS = "ws-addressing.headers";
 
 
-    protected static final Log log = LogFactory.getLog(Properties.class);
+    protected static final Logger log = LoggerFactory.getLogger(Properties.class);
 
     public static Object[] getProxyAndHeaders(Map<String, String> properties) {
         ArrayList<Header> headers = null; // /!\ Axis2 requires an ArrayList (not a List implementation)

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/SerializableElement.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/SerializableElement.java b/utils/src/main/java/org/apache/ode/utils/SerializableElement.java
index 4e868fb..6e66044 100644
--- a/utils/src/main/java/org/apache/ode/utils/SerializableElement.java
+++ b/utils/src/main/java/org/apache/ode/utils/SerializableElement.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.utils;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.w3c.dom.Element;
 
@@ -35,7 +35,7 @@ import java.io.Serializable;
  */
 public final class SerializableElement implements Serializable {
   private static final long serialVersionUID = -1L;
-  private static final Log __log = LogFactory.getLog(SerializableElement.class);
+  private static final Logger __log = LoggerFactory.getLogger(SerializableElement.class);
 
   private transient Element e;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/URITemplate.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/URITemplate.java b/utils/src/main/java/org/apache/ode/utils/URITemplate.java
index ce4835e..2c4abba 100644
--- a/utils/src/main/java/org/apache/ode/utils/URITemplate.java
+++ b/utils/src/main/java/org/apache/ode/utils/URITemplate.java
@@ -21,8 +21,8 @@ package org.apache.ode.utils;
 
 import org.apache.commons.httpclient.URIException;
 import org.apache.commons.httpclient.util.URIUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -78,7 +78,7 @@ import java.util.regex.Pattern;
 
 public class URITemplate {
 
-    private static final Log log = LogFactory.getLog(URITemplate.class);
+    private static final Logger log = LoggerFactory.getLogger(URITemplate.class);
 
 
     public static final String EXPANSION_REGEX = "\\{[^\\}]+\\}";

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/WatchDog.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/WatchDog.java b/utils/src/main/java/org/apache/ode/utils/WatchDog.java
index 1f92cf7..56cb07f 100644
--- a/utils/src/main/java/org/apache/ode/utils/WatchDog.java
+++ b/utils/src/main/java/org/apache/ode/utils/WatchDog.java
@@ -19,8 +19,8 @@
 
 package org.apache.ode.utils;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.util.Map;
@@ -47,7 +47,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
  */
 public class WatchDog<T, C extends WatchDog.Observer> implements Runnable {
     static final public long DEFAULT_DELAY = 30000;
-    final Log log = LogFactory.getLog(WatchDog.class);
+    final Logger log = LoggerFactory.getLogger(WatchDog.class);
 
     private long expire;
     private T lastModif;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java b/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java
index dfd2ed1..e7496ae 100644
--- a/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java
+++ b/utils/src/main/java/org/apache/ode/utils/cli/BaseCommandlineTool.java
@@ -19,154 +19,163 @@
 
 package org.apache.ode.utils.cli;
 
-import org.apache.log4j.AppenderSkeleton;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.SimpleLayout;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Layout;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.config.AppenderRef;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.ode.utils.Version;
 import org.apache.ode.utils.fs.TempFileManager;
 import org.apache.ode.utils.msg.MessageBundle;
+import org.slf4j.Logger;
 
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.nio.charset.Charset;
 
 public abstract class BaseCommandlineTool {
 
-  public static final int TERSE = 0;
-
-  public static final int VERBOSE = 1;
-
-  public static final int EFFUSIVE = 2;
-
-  private static boolean _tempFileManagerRegistered = false;
-
-  private static Class CLAZZ = BaseCommandlineTool.class;
-
-  private static final String LOGGING_PATTERN = "%p - %d{ISO8601} - <%c> %m%n";
-
-  protected static final Flag HELP_FLAG = new Flag("h",
-      "print usage and help to the console and exit.", false);
-
-  protected static final Fragments HELP = new Fragments(new CommandlineFragment[]{HELP_FLAG});
-
-  protected static final Flag QUIET_F = new Flag("q",
-      "only produce error output in the event of an error.", false);
-  protected static final Flag VERBOSE_F = new Flag("v",
-      "produce verbose (INFO-level) logging output.", false);
-  protected static final Flag VERYVERBOSE_F = new Flag("vv",
-      "product effusive (DEBUG-level) logging output", false);
-
-  protected static final XorGroup LOGGING = new XorGroup(
-      "set logging output verbosity from quiet (-q), to verbose (-v), to effusive (-vv).",
-      true);
-  static {
-    LOGGING.addFragment(QUIET_F);
-    LOGGING.addFragment(VERBOSE_F);
-    LOGGING.addFragment(VERYVERBOSE_F);
-  }
-
-  private static final CommandLineMessages __msgs = MessageBundle.getMessages(CommandLineMessages.class);
-
-  /**
-   * Print program banner.
-   */
-  public static void outputHeader() {
-    if (QUIET_F.isSet()) {
-      return;
-    }
-    System.out.println(__msgs.msgCliHeader(getProgramName(), Version.getVersionName(), Version
-        .getBuildDate()));
-  }
-
-  /**
-   * Initialize logging appropriate for command-line utilities. The logging will
-   * be limited to error messages on standard error, unless user-specified
-   * logging options are present. Among other things, this method looks for the
-   * <code>-v</code> option and configures logging verbosity appropriately
-   *
-   * @param level
-   */
-  protected static void initLogging(int level) {
-    ConsoleAppender appender = new ConsoleAppender(new SimpleLayout());
-    appender.setName("stderr appender");
-    appender.setWriter(new PrintWriter(System.err));
-    appender.setLayout(new PatternLayout(LOGGING_PATTERN));
-    initialize(appender, level);
-    BasicConfigurator.configure(appender);
-    Logger.getRootLogger().addAppender(appender);
-  }
-
-  protected static void initLogFile() throws IOException {
-    initLogFile(getLevel());
-  }
-
-  protected static void initLogFile(int level) throws IOException {
-    FileAppender appender = new FileAppender(new PatternLayout(LOGGING_PATTERN),
-        System.getProperty("ode.home") + "/logs/ode.log");
-    appender.setName("file appender");
-    initialize(appender, level);
-    BasicConfigurator.configure(appender);
-    Logger.getRootLogger().addAppender(appender);
-  }
-
-  private static void initialize(AppenderSkeleton appender, int level) {
-    switch (level) {
-      case EFFUSIVE :
-        appender.setThreshold(Level.DEBUG);
-        break;
-      case VERBOSE :
-        appender.setThreshold(Level.INFO);
-        break;
-      default :
-        appender.setThreshold(Level.WARN);
-    }
-  }
-
-  protected static void setClazz(Class c) {
-    CLAZZ = c;
-  }
-
-  protected static String getProgramName() {
-    return "java " + CLAZZ.getName();
-  }
-
-  protected static void initLogging() {
-    initLogging(getLevel());
-  }
-
-  private static int getLevel() {
-    if (QUIET_F.isSet()) {
-      return TERSE;
-    }
-    else if (VERBOSE_F.isSet()) {
-      return VERBOSE;
-    }
-    else if (VERYVERBOSE_F.isSet()) {
-      return EFFUSIVE;
-    }
-    else {
-      // none of the above.
-      return -1;
-    }
-  }
-
-  protected synchronized static final void registerTempFileManager() {
-    if (!_tempFileManagerRegistered) {
-      Runtime.getRuntime().addShutdownHook(new Thread() {
-
-        public void run() {
-          TempFileManager.cleanup();
-        }
-      });
-    }
-  }
-
-  protected static void consoleErr(String errMsg) {
-    String progName = getProgramName();
-    System.err.println(progName + ": " + errMsg);
-  }
+	public static final int TERSE = 0;
+
+	public static final int VERBOSE = 1;
+
+	public static final int EFFUSIVE = 2;
+
+	private static boolean _tempFileManagerRegistered = false;
+
+	private static Class CLAZZ = BaseCommandlineTool.class;
+
+	private static final String LOGGING_PATTERN = "%p - %d{ISO8601} - <%c> %m%n";
+
+	protected static final Flag HELP_FLAG = new Flag("h", "print usage and help to the console and exit.", false);
+
+	protected static final Fragments HELP = new Fragments(new CommandlineFragment[] { HELP_FLAG });
+
+	protected static final Flag QUIET_F = new Flag("q", "only produce error output in the event of an error.", false);
+	protected static final Flag VERBOSE_F = new Flag("v", "produce verbose (INFO-level) logging output.", false);
+	protected static final Flag VERYVERBOSE_F = new Flag("vv", "product effusive (DEBUG-level) logging output", false);
+
+	protected static final XorGroup LOGGING = new XorGroup(
+			"set logging output verbosity from quiet (-q), to verbose (-v), to effusive (-vv).", true);
+
+	static {
+		LOGGING.addFragment(QUIET_F);
+		LOGGING.addFragment(VERBOSE_F);
+		LOGGING.addFragment(VERYVERBOSE_F);
+	}
+
+	private static final CommandLineMessages __msgs = MessageBundle.getMessages(CommandLineMessages.class);
+
+	/**
+	 * Print program banner.
+	 */
+	public static void outputHeader() {
+		if (QUIET_F.isSet()) {
+			return;
+		}
+		System.out.println(__msgs.msgCliHeader(getProgramName(), Version.getVersionName(), Version.getBuildDate()));
+	}
+
+	/**
+	 * Initialize logging appropriate for command-line utilities. The logging
+	 * will be limited to error messages on standard error, unless
+	 * user-specified logging options are present. Among other things, this
+	 * method looks for the <code>-v</code> option and configures logging
+	 * verbosity appropriately
+	 *
+	 * @param level
+	 */
+	protected static void initLogging(int level) {
+	      final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+	      final Configuration config = ctx.getConfiguration();
+	      LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
+	      Layout layout = PatternLayout.createLayout(LOGGING_PATTERN,config,null,Charset.forName("UTF-8"),true,false,null,null);
+	      Appender appender = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "stderr appender", "false", "true");
+	      AppenderRef ref = initialize("stderr appender", level);
+	      AppenderRef[] refs = new AppenderRef[] {ref};
+	      loggerConfig.addAppender(appender, ref.getLevel(), null);
+	      loggerConfig.setLevel(ref.getLevel());
+	      ctx.updateLoggers();
+	}
+
+	protected static void initLogFile() throws IOException {
+		initLogFile(getLevel());
+	}
+
+	protected static void initLogFile(int level) throws IOException {
+	      final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+	      final Configuration config = ctx.getConfiguration();
+	      LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
+	      Layout layout = PatternLayout.createLayout(LOGGING_PATTERN,config,null,Charset.forName("UTF-8"),true,false,null,null);
+	      Appender appender = FileAppender.createAppender(System.getProperty("ode.home") + "/logs/ode.log", "false", "false", "File", "false",
+	          "true", "true", "8192", layout, null, "false", null, config);
+	      AppenderRef ref = initialize("File", level);
+	      AppenderRef[] refs = new AppenderRef[] {ref};
+	      loggerConfig.addAppender(appender, ref.getLevel(), null);
+	      loggerConfig.setLevel(ref.getLevel());
+	      ctx.updateLoggers();
+	}
+
+	  private static AppenderRef initialize(String name, int level) {
+	      Level appenderLevel = null;
+	      switch (level) {
+	          case EFFUSIVE :
+	              appenderLevel = Level.DEBUG;
+	          break;
+	          case VERBOSE :
+	              appenderLevel = Level.INFO;
+	          break;
+	          default :
+	              appenderLevel = Level.WARN;
+	          break;
+	    }
+	    return AppenderRef.createAppenderRef(name, appenderLevel, null);
+	  }
+
+	protected static void setClazz(Class c) {
+		CLAZZ = c;
+	}
+
+	protected static String getProgramName() {
+		return "java " + CLAZZ.getName();
+	}
+
+	protected static void initLogging() {
+		initLogging(getLevel());
+	}
+
+	private static int getLevel() {
+		if (QUIET_F.isSet()) {
+			return TERSE;
+		} else if (VERBOSE_F.isSet()) {
+			return VERBOSE;
+		} else if (VERYVERBOSE_F.isSet()) {
+			return EFFUSIVE;
+		} else {
+			// none of the above.
+			return -1;
+		}
+	}
+
+	protected synchronized static final void registerTempFileManager() {
+		if (!_tempFileManagerRegistered) {
+			Runtime.getRuntime().addShutdownHook(new Thread() {
+
+				public void run() {
+					TempFileManager.cleanup();
+				}
+			});
+		}
+	}
+
+	protected static void consoleErr(String errMsg) {
+		String progName = getProgramName();
+		System.err.println(progName + ": " + errMsg);
+	}
 }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java b/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java
index 0dac704..ca240a8 100644
--- a/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java
+++ b/utils/src/main/java/org/apache/ode/utils/fs/FileUtils.java
@@ -24,15 +24,15 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.TreeSet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Various file system utilities.
  */
 public class FileUtils {
 
-    private static final Log __log = LogFactory.getLog(FileUtils.class);
+    private static final Logger __log = LoggerFactory.getLogger(FileUtils.class);
 
     /**
      * Test if the given path is absolute or not.

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java b/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java
index f9185f8..7a1e62e 100644
--- a/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java
+++ b/utils/src/main/java/org/apache/ode/utils/fs/TempFileManager.java
@@ -27,15 +27,15 @@ import java.util.Collections;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Convenience class for managing temporary files and cleanup on JVM exit.
  */
 public class TempFileManager {
 
-  private static final Log __log = LogFactory.getLog(TempFileManager.class);
+  private static final Logger __log = LoggerFactory.getLogger(TempFileManager.class);
 
   private static TempFileManager __singleton;
   private static File __baseDir;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/jmx/SimpleMBean.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/jmx/SimpleMBean.java b/utils/src/main/java/org/apache/ode/utils/jmx/SimpleMBean.java
index 91bd639..b38b276 100644
--- a/utils/src/main/java/org/apache/ode/utils/jmx/SimpleMBean.java
+++ b/utils/src/main/java/org/apache/ode/utils/jmx/SimpleMBean.java
@@ -24,15 +24,15 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import javax.management.*;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * An extension of {@link StandardMBean} with common features such as registeration,
  * notification, sequence generation, etc. "built-in."
  */
 public abstract class SimpleMBean extends StandardMBean implements MBeanRegistration, NotificationEmitter {
-  private static final Log __log = LogFactory.getLog(SimpleMBean.class);
+  private static final Logger __log = LoggerFactory.getLogger(SimpleMBean.class);
 
   protected MBeanServer _mbeanServer;
   protected ObjectName _myName;
@@ -91,7 +91,7 @@ public abstract class SimpleMBean extends StandardMBean implements MBeanRegistra
     } catch (InstanceNotFoundException ex) {
         // ignore
     } catch (MBeanRegistrationException ex) {
-        __log.fatal("Error unregistering mbean: " + getObjectName().getCanonicalName(), ex);
+        __log.error("Error unregistering mbean: " + getObjectName().getCanonicalName(), ex);
     }
     try {
       server.registerMBean(this, getObjectName());
@@ -136,7 +136,7 @@ public abstract class SimpleMBean extends StandardMBean implements MBeanRegistra
       return new ObjectName(buf.toString());
     } catch (Exception ex) {
       String errmsg = "DomainNodeImpl.createObjectName is broken!";
-      __log.fatal(errmsg,ex);
+      __log.error(errmsg,ex);
       throw new AssertionError(errmsg);
     }
   }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/rmi/RMIConstants.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/rmi/RMIConstants.java b/utils/src/main/java/org/apache/ode/utils/rmi/RMIConstants.java
index a462740..a6da788 100644
--- a/utils/src/main/java/org/apache/ode/utils/rmi/RMIConstants.java
+++ b/utils/src/main/java/org/apache/ode/utils/rmi/RMIConstants.java
@@ -19,15 +19,15 @@
 
 package org.apache.ode.utils.rmi;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Constant related to naming of ODE objects in JMX.
  * @deprecated DO NO USE: Find your own way to get this URL.
  */
 public final class RMIConstants {
-  private static final Log __log = LogFactory.getLog(RMIConstants.class);
+  private static final Logger __log = LoggerFactory.getLogger(RMIConstants.class);
 
 
   /**

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java b/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java
index f6e4c1d..0e679c1 100644
--- a/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java
+++ b/utils/src/main/java/org/apache/ode/utils/sax/LoggingErrorHandler.java
@@ -22,8 +22,8 @@ package org.apache.ode.utils.sax;
 import org.apache.ode.utils.msg.CommonMessages;
 import org.apache.ode.utils.msg.MessageBundle;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
@@ -34,8 +34,8 @@ import org.xml.sax.SAXParseException;
  */
 public class LoggingErrorHandler implements ErrorHandler {
 
-  private static final Log __log = LogFactory.getLog(LoggingErrorHandler.class);
-  private Log _l;
+  private static final Logger __log = LoggerFactory.getLogger(LoggingErrorHandler.class);
+  private Logger _l;
 
   private static final String WARNING = MessageBundle.getMessages(CommonMessages.class)
       .strWarning().toUpperCase();
@@ -59,7 +59,7 @@ public class LoggingErrorHandler implements ErrorHandler {
    * @param log
    *          the <code>Log</code> on which to dump messages.
    */
-  public LoggingErrorHandler(Log log) {
+  public LoggingErrorHandler(Logger log) {
     _l = log;
   }
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java b/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java
index 948e22b..0b6f233 100644
--- a/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java
+++ b/utils/src/main/java/org/apache/ode/utils/trax/LogErrorListener.java
@@ -21,13 +21,13 @@ package org.apache.ode.utils.trax;
 import javax.xml.transform.ErrorListener;
 import javax.xml.transform.TransformerException;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 public class LogErrorListener implements ErrorListener {
 
-  private Log _log;
+  private Logger _log;
 
-  public LogErrorListener(Log log) {
+  public LogErrorListener(Logger log) {
     _log = log;
   }
 
@@ -42,7 +42,7 @@ public class LogErrorListener implements ErrorListener {
 
   public void fatalError(TransformerException exception)
       throws TransformerException {
-    _log.fatal(exception.getMessageAndLocation(),exception);
+    _log.error(exception.getMessageAndLocation(),exception);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xml/capture/Tracker.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xml/capture/Tracker.java b/utils/src/main/java/org/apache/ode/utils/xml/capture/Tracker.java
index f51cfd3..942c96f 100644
--- a/utils/src/main/java/org/apache/ode/utils/xml/capture/Tracker.java
+++ b/utils/src/main/java/org/apache/ode/utils/xml/capture/Tracker.java
@@ -21,8 +21,8 @@ package org.apache.ode.utils.xml.capture;
 import java.net.URI;
 import java.util.Set;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
@@ -32,7 +32,7 @@ import org.xml.sax.SAXException;
  * Base class for schema-specifc dependency trackers.
  */
 public abstract class Tracker implements ContentHandler {
-  private static final Log __log = LogFactory.getLog(Tracker.class);
+  private static final Logger __log = LoggerFactory.getLogger(Tracker.class);
 
   private Set<URI> references_ ;
   private URI base_;

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xml/capture/Wsdl11Tracker.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xml/capture/Wsdl11Tracker.java b/utils/src/main/java/org/apache/ode/utils/xml/capture/Wsdl11Tracker.java
index 1ee2fc1..3303ef3 100644
--- a/utils/src/main/java/org/apache/ode/utils/xml/capture/Wsdl11Tracker.java
+++ b/utils/src/main/java/org/apache/ode/utils/xml/capture/Wsdl11Tracker.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.utils.xml.capture;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 
@@ -29,7 +29,7 @@ import org.xml.sax.SAXException;
  * document may have in-line schemas.
  */
 public class Wsdl11Tracker extends XmlSchemaTracker {
-  private static final Log __log = LogFactory.getLog(Wsdl11Tracker.class);
+  private static final Logger __log = LoggerFactory.getLogger(Wsdl11Tracker.class);
 
   public static final String NS = "http://schemas.xmlsoap.org/wsdl/";
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java b/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java
index 0eefb0a..a6d29c3 100644
--- a/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java
+++ b/utils/src/main/java/org/apache/ode/utils/xml/capture/XmlSchemaTracker.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.utils.xml.capture;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 
@@ -27,7 +27,7 @@ import org.xml.sax.SAXException;
  * {@link Tracker} for XML schema imports / includes.
  */
 public class XmlSchemaTracker extends Tracker {
-  private static final Log __log = LogFactory.getLog(XmlSchemaTracker.class);
+  private static final Logger __log = LoggerFactory.getLogger(XmlSchemaTracker.class);
 
   private static final String NS="http://www.w3.org/2001/XMLSchema" ;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java b/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java
index 3242bf7..13ced9f 100644
--- a/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java
+++ b/utils/src/main/java/org/apache/ode/utils/xsd/CapturingXMLEntityResolver.java
@@ -18,8 +18,8 @@
  */
 package org.apache.ode.utils.xsd;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.StreamUtils;
 import org.apache.ode.utils.fs.FileUtils;
 import org.apache.xerces.xni.XMLResourceIdentifier;
@@ -40,8 +40,8 @@ import java.util.Map;
  * "whole" of a schema document (including imports and other dependencies).
  */
 public class CapturingXMLEntityResolver implements XMLEntityResolver {
-  private static final Log __log = LogFactory
-      .getLog(CapturingXMLEntityResolver.class);
+  private static final Logger __log = LoggerFactory
+      .getLogger(CapturingXMLEntityResolver.class);
 
   private XMLEntityResolver _resolver;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java b/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java
index d340555..48f447d 100644
--- a/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java
+++ b/utils/src/main/java/org/apache/ode/utils/xsd/LoggingXmlErrorHandler.java
@@ -19,7 +19,7 @@
 
 package org.apache.ode.utils.xsd;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 import org.apache.ode.utils.msg.MessageBundle;
 import org.apache.xerces.xni.XNIException;
 import org.apache.xerces.xni.parser.XMLErrorHandler;
@@ -31,20 +31,20 @@ import org.apache.xerces.xni.parser.XMLParseException;
  */
 public class LoggingXmlErrorHandler implements XMLErrorHandler {
 
-  private Log _log;
+  private Logger _log;
 
   private static final XsdMessages __msgs = MessageBundle.getMessages(XsdMessages.class);
 
   private XMLParseException _ex;
 
   /**
-   * Create a new instance that will output to the specified {@link Log}
+   * Create a new instance that will output to the specified {@link Logger}
    * instance.
    *
    * @param log
    *          the target log, which much be non-<code>null</code>
    */
-  public LoggingXmlErrorHandler(Log log) {
+  public LoggingXmlErrorHandler(Logger log) {
     assert log != null;
     _log = log;
   }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java b/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
index 072a990..53d7329 100644
--- a/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
+++ b/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
@@ -27,8 +27,8 @@ import java.util.Map;
 
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.xerces.dom.DOMInputImpl;
 import org.apache.xerces.impl.Constants;
 import org.apache.xerces.impl.xs.XMLSchemaLoader;
@@ -48,7 +48,7 @@ import org.w3c.dom.ls.LSInput;
  * Xerces based schema model.
  */
 public class SchemaModelImpl implements SchemaModel {
-    private static final Log __log = LogFactory.getLog(SchemaModelImpl.class);
+    private static final Logger __log = LoggerFactory.getLogger(SchemaModelImpl.class);
     private XSModel _model;
 
     private SchemaModelImpl(XSModel model) {
@@ -99,8 +99,8 @@ public class SchemaModelImpl implements SchemaModel {
             boolean isWarning = (error.getSeverity() == DOMError.SEVERITY_WARNING);
             __log.warn("Schema error", ((Exception)error.getRelatedException()));
             __log.warn(error.getLocation().getUri() + ":" + error.getLocation().getLineNumber());
-            __log.warn(error.getRelatedData());
-            __log.warn(error.getRelatedException());
+            __log.warn(error.getRelatedData().toString());
+            __log.warn(error.getRelatedException().toString());
             return isWarning;
         }
     }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xsd/XSUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xsd/XSUtils.java b/utils/src/main/java/org/apache/ode/utils/xsd/XSUtils.java
index 0c2cc26..7659c13 100644
--- a/utils/src/main/java/org/apache/ode/utils/xsd/XSUtils.java
+++ b/utils/src/main/java/org/apache/ode/utils/xsd/XSUtils.java
@@ -25,8 +25,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.msg.MessageBundle;
 import org.apache.xerces.dom.DOMInputImpl;
 import org.apache.xerces.impl.Constants;
@@ -46,7 +46,7 @@ import org.w3c.dom.ls.LSInput;
  */
 public class XSUtils {
 
-    private static final Log __log = LogFactory.getLog(XSUtils.class);
+    private static final Logger __log = LoggerFactory.getLogger(XSUtils.class);
 
     private static final XsdMessages __msgs = MessageBundle.getMessages(XsdMessages.class);
 
@@ -145,16 +145,16 @@ public class XSUtils {
      */
     static class LoggingXmlErrorHandler implements XMLErrorHandler {
 
-        private Log _log;
+        private Logger _log;
 
         private ArrayList<XMLParseException> _errors = new ArrayList<XMLParseException>();
 
         /**
-         * Create a new instance that will output to the specified {@link Log}
+         * Create a new instance that will output to the specified {@link Logger}
          * instance.
          * @param log the target log, which much be non-<code>null</code>
          */
-        public LoggingXmlErrorHandler(Log log) {
+        public LoggingXmlErrorHandler(Logger log) {
             assert log != null;
             _log = log;
         }
@@ -209,9 +209,9 @@ public class XSUtils {
     static class LoggingDOMErrorHandler implements DOMErrorHandler {
 
         private ArrayList<Exception> _exceptions = new ArrayList<Exception>();
-        private Log _log;
+        private Logger _log;
 
-        public LoggingDOMErrorHandler(Log log) {
+        public LoggingDOMErrorHandler(Logger log) {
             assert log != null;
             _log = log;
         }

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java b/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java
index a1e0c66..547fbd9 100644
--- a/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java
+++ b/utils/src/main/java/org/apache/ode/utils/xsl/XslTransformHandler.java
@@ -38,8 +38,8 @@ import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
 import org.apache.commons.collections.map.MultiKeyMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.DOMUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -55,7 +55,7 @@ import org.w3c.dom.Node;
  */
 public class XslTransformHandler {
 
-    private static final Log __log = LogFactory.getLog(XslTransformHandler.class);
+    private static final Logger __log = LoggerFactory.getLogger(XslTransformHandler.class);
 
   private static XslTransformHandler __singleton;
 

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/test/java/org/apache/ode/utils/xsd/SchemaCaptureTest.java
----------------------------------------------------------------------
diff --git a/utils/src/test/java/org/apache/ode/utils/xsd/SchemaCaptureTest.java b/utils/src/test/java/org/apache/ode/utils/xsd/SchemaCaptureTest.java
index aa09424..b824279 100644
--- a/utils/src/test/java/org/apache/ode/utils/xsd/SchemaCaptureTest.java
+++ b/utils/src/test/java/org/apache/ode/utils/xsd/SchemaCaptureTest.java
@@ -28,8 +28,8 @@ import java.util.Map;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.apache.ode.utils.StreamUtils;
 import org.apache.ode.utils.TestResources;
 import org.apache.xerces.xni.XMLResourceIdentifier;
@@ -42,7 +42,7 @@ import org.junit.Test;
  * Test schema capture functionality.
  */
 public class SchemaCaptureTest {
-    private static Log __log = LogFactory.getLog(SchemaCaptureTest.class);
+    private static Logger __log = LoggerFactory.getLogger(SchemaCaptureTest.class);
 
     @Test
     public void testSchemaCapture() throws Exception {

http://git-wip-us.apache.org/repos/asf/ode/blob/573900b7/utils/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/utils/src/test/resources/log4j2.xml b/utils/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..9f6bc53
--- /dev/null
+++ b/utils/src/test/resources/log4j2.xml
@@ -0,0 +1,37 @@
+<Configuration>
+    <Appenders>
+        <File name="FILE" fileName="target/test/test.log" append="false">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </File>
+        <Console name="STDOUT" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </Console>
+        <Async name="Async">
+            <AppenderRef ref="FILE"/>
+            <AppenderRef ref="STDOUT"/>
+        </Async>
+    </Appenders>
+
+    <Loggers>
+        <Logger name="org.apache.ode" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.axis2" level="info" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+       <Logger name="org.hibernate" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.apache.openjpa" level="warn" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+        <Logger name="org.springframework" level="error" additivity="false">
+            <AppenderRef ref="FILE"/>
+        </Logger>
+
+        <Root level="info">
+            <AppenderRef ref="Async"/>
+        </Root>
+    </Loggers>
+
+</Configuration>


Mime
View raw message