axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Output from AdminClient (was: Re: cvs commit: xml-axis/java/t est/wsdl/extensibility ExtensibilityQueryTestCase.java)
Date Mon, 29 Jul 2002 15:55:22 GMT
 
I am with Dug on this one, end user tools should be pretty chatty by default, letting the
user know what is going on at all times.
A -q switch is a good way for things (like our function test deploy) that don't want to see
anything but error output.
 
In summary:
1.  Yes
2. -q switch
 
--
Tom Jordahl
Macromedia
 
 
-----Original Message-----
From: dug@us.ibm.com [mailto:dug@us.ibm.com]
Sent: Thursday, July 25, 2002 2:10 PM
To: axis-dev@xml.apache.org
Subject: Re: Output from AdminClient (was: Re: cvs commit: xml-axis/java/test/wsdl/extensibility
ExtensibilityQueryTestCase.java)



AdminClient is an "end-user" program not an internal tool
and needs to be helpful to someone w/o access to code,
and as such when an "end-user" runs:
AdminClient *.wsdd
and get an exception they'll never know which wsdd it was
on when it got the error. Printing the "Processing <filename>"
helps the user. So:
1 - yes
2 - "-q" because the default should be helpful. Much like
cvs will tell you which dir its processing and you can add a
-q to tell it to shut up.

-Dug

ps. Don't care as much about the "Done Processing" message
those can be logged for all I care - I view those as "extra" messages
and not critical to a newbie user's experience.



Please respond to axis-dev@xml.apache.org 


To: axis-dev@xml.apache.org
cc: 
Subject: Output from AdminClient (was: Re: cvs commit: xml-axis/java/test/wsdl/extensibility
ExtensibilityQueryTestCase.java)



Doug and I have had a discussion about this. As AdminClient exists right now, if you turn
the root logger category to FATAL in log4j.properties in axis.jar, then you DO NOT get any
output. Doug argues that AdminClient should ALWAYS generate output. I posit that there are
legitimate reasons why you may not want output - our build a good case in point. Doug's counter-proposal
is that AdminClient should have a flag, either -q for quiet or -v for verbose (where the default
is the opposite of whatever flag we use).

So a couple questions for y'all.
1. Do you agree with Doug that AdminClient's output SHOULD NOT be logged, but should be System.out.println'ed
instead?
2. If so, which flag do you prefer? -q or -v?

My votes are:
1. No
2. so we don't need a flag (though a flag isn't a bad idea, and if we do have one, I'd vote
for -v).

Russell Butek
butek@us.ibm.com

Please respond to axis-dev@xml.apache.org 

To: axis-dev@xml.apache.org
cc: 
Subject: Re: cvs commit: xml-axis/java/test/wsdl/extensibility ExtensibilityQueryTestCase.java



Like I said in my commit, my change doesn't affect the command line usage of AdminClient.
When using the command line, log.info is the same as System.out.println. The string "- Processing
file xxx" has been log.info for months. I'm just making things consistent.

Russell Butek
butek@us.ibm.com

Please respond to axis-dev@xml.apache.org 

To: axis-dev@xml.apache.org
cc: 
Subject: Re: cvs commit: xml-axis/java/test/wsdl/extensibility ExtensibilityQueryTestCase.java




Russel,
when you run the admin client from the command line it would be nice
if there's output telling the user what's going on - hence the use of stdout.
I agree they both should go to the same place but it shouldn't be logged
it should be to stdout.
-Dug

Please respond to axis-dev@xml.apache.org 

To: xml-axis-cvs@apache.org
cc: 
Subject: cvs commit: xml-axis/java/test/wsdl/extensibility ExtensibilityQueryTestCase.java



butek       2002/07/25 10:09:58




	Modified:    java/src/org/apache/axis/client AdminClient.java
java/test/utils TestSrcContent.java
java/test/wsdl/extensibility ExtensibilityQueryTestCase.java
Log:
Another bit of test output removed.  This one showed me a small problem
with AdminClient.  AdminClient typically generates two messages:

	- Processing file xxx
- <Admin>Done processing</Admin>

	The first was output via log.info.  The second via System.out.println.  These
should both be generated via log.info.  That way both messages can be
removed from my output.  The change doesn't affect command-line usage.

	Revision  Changes    Path
1.66      +1 -1      xml-axis/java/src/org/apache/axis/client/AdminClient.java

	Index: AdminClient.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AdminClient.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- AdminClient.java 3 Jul 2002 17:50:31 -0000 1.65
+++ AdminClient.java 25 Jul 2002 17:09:58 -0000 1.66
@@ -340,7 +340,7 @@ 

	String result = admin.process(args);
if (result != null)

	-                System.out.println(result);
+                log.info(result); 

	else
System.exit(1);

	} catch (Exception e) {

	1.10      +2 -2      xml-axis/java/test/utils/TestSrcContent.java

	Index: TestSrcContent.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/utils/TestSrcContent.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TestSrcContent.java 1 Jul 2002 09:29:43 -0000 1.9
+++ TestSrcContent.java 25 Jul 2002 17:09:58 -0000 1.10
@@ -154,7 +154,6 @@ 

	// Verify that axis java files do not use System.out.println
// or System.err.println, except:
//   - utils/tcpmon.java

	-            //   - client/AdminClient.java
//   - providers/BSFProvider.java
//   - utils/CLArgsParser.java
//   - Version.java
@@ -163,7 +162,6 @@
new FileNameContentPattern(".+([\\\\/])" 

	+ "java\\1src\\1org\\1apache\\1axis\\1"
+ "(?!utils\\1tcpmon\\.java"

	-                                       + "|client\\1AdminClient\\.java"
+ "|providers\\1BSFProvider\\.java"
+ "|utils\\1CLArgsParser\\.java"
+ "|Version\\.java"
@@ -175,6 +173,7 @@
// Verify that internationalization is being used properly
// with logger.  Exceptions:
//   - all log.debug calls
+            //   - client/AdminClient.java
//   - utils/tcpmon.java
//   - utils/Admin.java
//   - handlers/LogMessage.java
@@ -183,6 +182,7 @@
new FileNameContentPattern(".+([\\\\/])" 

	+ "java\\1src\\1org\\1apache\\1axis\\1"
+ "(?!utils\\1tcpmon\\.java"

	+                                       + "|client\\1AdminClient\\.java"
+ "|utils\\1Admin\\.java"
+ "|handlers\\1LogMessage\\.java"
+ "|wsdl\\1)"



	1.10      +9 -0      xml-axis/java/test/wsdl/extensibility/ExtensibilityQueryTestCase.java

	Index: ExtensibilityQueryTestCase.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/extensibility/ExtensibilityQueryTestCase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ExtensibilityQueryTestCase.java 25 Jul 2002 16:14:12 -0000 1.9
+++ ExtensibilityQueryTestCase.java 25 Jul 2002 17:09:58 -0000 1.10
@@ -16,6 +16,9 @@
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanDeserializer;

	+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
import javax.xml.rpc.encoding.TypeMapping;
import javax.xml.namespace.QName;
import java.util.Calendar;
@@ -26,6 +29,9 @@
}
public void testQuery() {
ExtensibilityQueryPortType binding;
+        Logger root = Logger.getRootLogger();
+        Level origLevel = root.getEffectiveLevel();
+        root.setLevel(Level.FATAL); 

	try {
ExtensibilityQueryLocator locator = new ExtensibilityQueryLocator();
binding = locator.getExtensibilityQueryPort();

	@@ -37,6 +43,9 @@
}
catch (Exception e) {
throw new junit.framework.AssertionFailedError("Binding initialization Exception caught: "
+ e);
+        }
+        finally {
+            root.setLevel(origLevel); 

	}
assertTrue("binding is null", binding != null);










Mime
View raw message