struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject svn commit: r365807 - in /struts/shale/trunk/core-library: build.xml src/java/org/apache/shale/remoting/package.html
Date Wed, 04 Jan 2006 03:10:30 GMT
Author: craigmcc
Date: Tue Jan  3 19:10:27 2006
New Revision: 365807

URL: http://svn.apache.org/viewcvs?rev=365807&view=rev
Log:
Make it possible to set the log levels for org.apache.shale classes when
unit tests are running, for example:

   ant -Dtest.level=trace test

Also, correct a typo on retrieving response writers and streams.

Modified:
    struts/shale/trunk/core-library/build.xml
    struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/package.html

Modified: struts/shale/trunk/core-library/build.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/build.xml?rev=365807&r1=365806&r2=365807&view=diff
==============================================================================
--- struts/shale/trunk/core-library/build.xml (original)
+++ struts/shale/trunk/core-library/build.xml Tue Jan  3 19:10:27 2006
@@ -58,6 +58,9 @@
   <property name="test.haltonerror"        value="true"/>
   <property name="test.haltonfailure"      value="true"/>
   <property name="test.runner"             value="junit.textui.TestRunner"/>
+  <property name="test.factory"            value="org.apache.commons.logging.impl.LogFactoryImpl"/>
+  <property name="test.log"                value="org.apache.commons.logging.impl.SimpleLog"/>
+  <property name="test.level"              value="error"/>
 
 
   <!-- Compile Classpath -->
@@ -428,6 +431,12 @@
           printSummary="no">
 
       <jvmarg    value="-enableassertions:org.apache.shale..."/>
+      <sysproperty key="org.apache.commons.logging.LogFactory"
+                 value="${test.factory}"/>
+      <sysproperty key="org.apache.commons.logging.Log"
+                 value="${test.log}"/>
+      <sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.shale"
+                 value="${test.level}"/>
       <sysproperty key="documentRoot"
                  value="${build.home}/test-classes"/>
       <classpath refid="test.classpath"/>

Modified: struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/package.html
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/package.html?rev=365807&r1=365806&r2=365807&view=diff
==============================================================================
--- struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/package.html (original)
+++ struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/package.html Tue Jan
 3 19:10:27 2006
@@ -91,7 +91,7 @@
         and use its methods, just as a <code>Renderer</code> would:
         <blockquote><pre>
 FacesContext context = FacesContext.getCurrentInstance();
-ResponseWriter writer = (new ResponseFactory()).createResponseWriter(context, "text/xml");
+ResponseWriter writer = (new ResponseFactory()).getResponseWriter(context, "text/xml");
 writer.startDocument();
 ...
 writer.endDocument();
@@ -101,7 +101,7 @@
         and use its methods:
         <blockquote><pre>
 FacesContext context = FacesContext.getCurrentInstance();
-ResponseStream stream = (new ResponseFactory()).createResponseStream(context, "image/gif");
+ResponseStream stream = (new ResponseFactory()).getResponseStream(context, "image/gif");
 stream.write(...);
 ...
 stream.close();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message