axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@us.ibm.com
Subject Output from AdminClient (was: Re: cvs commit: xml-axis/java/test/wsdl/extensibility ExtensibilityQueryTestCase.java)
Date Thu, 25 Jul 2002 17:54:39 GMT

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


Russell Butek/Austin/IBM@IBMUS on 07/25/2002 12:20:15 PM

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