camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1235048 - in /camel/trunk: components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/ components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ tests/camel-itest-osgi/src/test/java/org/apache/c...
Date Mon, 23 Jan 2012 22:49:19 GMT
Author: bvahdat
Date: Mon Jan 23 22:49:19 2012
New Revision: 1235048

URL: http://svn.apache.org/viewvc?rev=1235048&view=rev
Log:
Avoid the (direct) usage of log4j API

Modified:
    camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
    camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java

Modified: camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java?rev=1235048&r1=1235047&r2=1235048&view=diff
==============================================================================
--- camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
(original)
+++ camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
Mon Jan 23 22:49:19 2012
@@ -29,14 +29,18 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.jaxp.XmlConverter;
-import org.apache.log4j.Logger;
+
 import org.apache.xml.security.encryption.XMLCipher;
 import org.apache.xml.security.encryption.XMLEncryptionException;
+
 import org.custommonkey.xmlunit.Diff;
 import org.custommonkey.xmlunit.XMLUnit;
 
 import org.junit.Assert;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class TestHelper {
     
     protected static final String NS_XML_FRAGMENT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
@@ -84,7 +88,7 @@ public class TestHelper {
         HAS_3DES = ok;
     }
     
-    Logger log = Logger.getLogger(TestHelper.class);
+    Logger log = LoggerFactory.getLogger(TestHelper.class);
 
     protected void sendText(final String fragment, CamelContext context) throws Exception
{
         ProducerTemplate template = context.createProducerTemplate();
@@ -95,7 +99,7 @@ public class TestHelper {
                 exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
                 Message in = exchange.getIn();
                 in.setBody(fragment);
-                log.info("xmlFragment: " + fragment);
+                log.info("xmlFragment: {}", fragment);
             }
         });
     }

Modified: camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperTestSupport.java?rev=1235048&r1=1235047&r2=1235048&view=diff
==============================================================================
--- camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperTestSupport.java
(original)
+++ camel/trunk/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperTestSupport.java
Mon Jan 23 22:49:19 2012
@@ -36,7 +36,6 @@ import org.apache.camel.test.junit4.Came
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.IOHelper;
 
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
@@ -48,16 +47,20 @@ import org.apache.zookeeper.data.Stat;
 import org.apache.zookeeper.server.NIOServerCnxn;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class ZooKeeperTestSupport extends CamelTestSupport {
 
     protected static TestZookeeperServer server;
     
     protected static TestZookeeperClient client;
 
-    private static final Logger LOG = Logger.getLogger(ZooKeeperTestSupport.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperTestSupport.class);
  
     protected String testPayload = "This is a test";
 
@@ -143,7 +146,7 @@ public class ZooKeeperTestSupport extend
 
         public static int x;
 
-        private final Logger log = Logger.getLogger(getClass());
+        private final Logger log = LoggerFactory.getLogger(getClass());
 
         private ZooKeeper zk;
 
@@ -228,7 +231,7 @@ public class ZooKeeperTestSupport extend
                     return true;
                 }
             } catch (IOException e) {
-                LOG.info("server " + hp + " not up " + e);
+                LOG.info("server {} not up {}", hp, e);
             }
 
             if (System.currentTimeMillis() > start + timeout) {

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java?rev=1235048&r1=1235047&r2=1235048&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/zookeeper/ZookeeperOSGiTestSupport.java
Mon Jan 23 22:49:19 2012
@@ -37,8 +37,6 @@ import org.apache.camel.itest.osgi.OSGiI
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.IOHelper;
 
-import org.apache.log4j.Logger;
-
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
@@ -56,12 +54,16 @@ import org.junit.BeforeClass;
 
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import static org.ops4j.pax.exam.OptionUtils.combine;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
 
 public class ZookeeperOSGiTestSupport extends OSGiIntegrationTestSupport {
 
-    protected static final Logger LOG = Logger.getLogger(ZookeeperOSGiTestSupport.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(ZookeeperOSGiTestSupport.class);
     protected static TestZookeeperServer server;
     protected static TestZookeeperClient client;
 
@@ -71,7 +73,7 @@ public class ZookeeperOSGiTestSupport ex
         server = new TestZookeeperServer(getServerPort(), clearServerData());
         waitForServerUp("localhost:" + getServerPort(), 1000);
         client = new TestZookeeperClient(getServerPort(), getTestClientSessionTimeout());
-        LOG.info("Started Zookeeper Test Infrastructure on port " + getServerPort());
+        LOG.info("Started Zookeeper Test Infrastructure on port {}", getServerPort());
     }
 
     public ZooKeeper getConnection() {
@@ -146,7 +148,7 @@ public class ZookeeperOSGiTestSupport ex
 
     public static class TestZookeeperClient implements Watcher {
 
-        private final Logger log = Logger.getLogger(getClass());
+        private final Logger log = LoggerFactory.getLogger(getClass());
         private final CountDownLatch connected = new CountDownLatch(1);
         private ZooKeeper zk;
 
@@ -227,7 +229,7 @@ public class ZookeeperOSGiTestSupport ex
                     return true;
                 }
             } catch (IOException e) {
-                LOG.info("server " + hp + " not up " + e);
+                LOG.info("server {} not up {}", hp, e);
             }
 
             if (System.currentTimeMillis() > start + timeout) {



Mime
View raw message