Revision: 690
          http://svn.sourceforge.net/jwebunit/?rev=690&view=rev
Author:   henryju
Date:     2007-04-01 09:30:24 -0700 (Sun, 01 Apr 2007)

Log Message:
-----------
Replace commons-logging by slf4j.

Modified Paths:
--------------
    trunk/jwebunit-htmlunit-plugin/pom.xml
    
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
    trunk/pom.xml

Modified: trunk/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/pom.xml      2007-04-01 16:14:06 UTC (rev 
689)
+++ trunk/jwebunit-htmlunit-plugin/pom.xml      2007-04-01 16:30:24 UTC (rev 
690)
@@ -49,10 +49,14 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>servlet-api</artifactId>
         </dependency>

Modified: 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
===================================================================
--- 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
  2007-04-01 16:14:06 UTC (rev 689)
+++ 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
  2007-04-01 16:30:24 UTC (rev 690)
@@ -84,12 +84,13 @@
 import org.apache.commons.httpclient.Cookie;
 import org.apache.commons.httpclient.HttpState;
 import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
 import org.jaxen.JaxenException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Acts as the wrapper for HtmlUnit access. A dialog is initialized with a 
given URL, and maintains conversational state
@@ -102,7 +103,7 @@
     /**
      * Logger for this class.
      */
-    private static final Log LOGGER = LogFactory.getLog(HtmlUnitDialog.class);
+    private final Logger logger = 
LoggerFactory.getLogger(HtmlUnitDialog.class);
 
     /**
      * Encapsulate browser abilities.
@@ -675,7 +676,7 @@
                 if (oldPage instanceof HtmlPage) {
                     oldPageTitle = ((HtmlPage) oldPage).getTitleText();
                 }
-                LOGGER.info("Window " + win + " closed : " + oldPageTitle);
+                logger.debug("Window {} closed : {}", win, oldPageTitle);
             }
 
             public void webWindowContentChanged(WebWindowEvent event) {
@@ -689,18 +690,16 @@
                 String newPageTitle = "no_html";
                 if (newPage instanceof HtmlPage)
                     newPageTitle = ((HtmlPage) newPage).getTitleText();
-                LOGGER.info("Window \"" + winName + "\" changed : \""
-                        + oldPageTitle + "\" became \"" + newPageTitle + "\"");
+                logger.debug("Window \"{}\" changed : \"{}\" became \"{}", new 
Object[] {winName, oldPageTitle, newPageTitle});
             }
 
             public void webWindowOpened(WebWindowEvent event) {
                 String win = event.getWebWindow().getName();
                 Page newPage = event.getNewPage();
                 if (newPage != null && newPage instanceof HtmlPage) {
-                    LOGGER.info("Window " + win + " openend : "
-                            + ((HtmlPage) newPage).getTitleText());
+                    logger.debug("Window {} opened : {}", win, ((HtmlPage) 
newPage).getTitleText());
                 } else {
-                    LOGGER.info("Window " + win + " openend");
+                    logger.info("Window {} opened", win);
                 }
             }
         });

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml       2007-04-01 16:14:06 UTC (rev 689)
+++ trunk/pom.xml       2007-04-01 16:30:24 UTC (rev 690)
@@ -259,8 +259,13 @@
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>3.8.2</version>
-            </dependency>            
+            </dependency>          
             <dependency>
+                <groupId>junitperf</groupId>
+                <artifactId>junitperf</artifactId>
+                <version>1.8</version>
+            </dependency>  
+            <dependency>
                 <groupId>org.mortbay.jetty</groupId>
                 <artifactId>jetty</artifactId>
                 <version>6.1.2rc2</version>
@@ -286,32 +291,16 @@
                 <version>2.4</version>
             </dependency>
             <dependency>
-                <groupId>commons-logging</groupId>
-                <artifactId>commons-logging</artifactId>
-                <version>1.1</version>
-                <exclusions>
-                    <exclusion>
-                        <artifactId>junit</artifactId>
-                        <groupId>junit</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>log4j</artifactId>
-                        <groupId>log4j</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>logkit</artifactId>
-                        <groupId>logkit</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>avalon-framework</artifactId>
-                        <groupId>avalon-framework</groupId>
-                    </exclusion>
-                    <exclusion>
-                        <artifactId>servlet-api</artifactId>
-                        <groupId>javax.servlet</groupId>
-                    </exclusion>
-                </exclusions>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.3.0</version>
             </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>1.3.0</version>
+                <scope>test</scope>
+            </dependency>
         </dependencies>
     </dependencyManagement>
     <reporting>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to