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: Recent change to stock/GetQuote.java
Date Tue, 12 Mar 2002 22:15:45 GMT

+1 
No logging for main()/command line code.

--
Tom Jordahl


-----Original Message-----
From: Doug Davis [mailto:dug@us.ibm.com]
Sent: Tuesday, March 12, 2002 5:04 PM
To: axis-dev@xml.apache.org
Subject: RE: Recent change to stock/GetQuote.java


Richard,
  As Glen said there are plenty of places (like internal to axis) where
logging makes the most sense.  But I would claim that in things like
the samples and AdminClient when we're in the "main" method people
are 99% of the time going to be running it from the command line.
So, running something from the command line and then getting no
output when there's an error isn't very friendly and in fact I would go
further and claim its a bug - granted a usability bug - but still a bug.
Aside from that - there's still the other usability issue - where the
log file goes.  Without *any* configuration I have no idea where
these log messages are going (and 2 other axis-dev'ers didn't
either).  We should at least default this to something that is intuitive,
like the current dir.
-Dug


Richard Sitze/Charlotte/IBM@IBMUS on 03/12/2002 04:50:33 PM

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

To:    axis-dev@xml.apache.org
cc:
Subject:    RE: Recent change to stock/GetQuote.java



<ras>my comments below</ras>

*******************************************
Richard A. Sitze            rsitze@us.ibm.com
CORBA Interoperability & WebServices
IBM WebSphere Development



                      Glen Daniels
                      <gdaniels@macrom         To:
                      "'axis-dev@xml.apache.org'"
                      edia.com>                <axis-dev@xml.apache.org>
                                               cc:
                      03/12/2002 03:50         Subject: RE: Recent change
                      to stock/GetQuote.java
                      PM
                      Please respond
                      to axis-dev







While there are many places in the system where people integrating Axis
will want to be using logging, there are also many places (esp the samples)
where there are end users directly using Axis clients.  I agree with Doug
that it's kind of silly for those people to have to change their log4j
configuration to get at errors which make sense to be sent to the console.
If that's what was happening here, it's a dandy fix.  Doug, I think, was
claiming that there are now too many places where we rely on log4j for
output where System.err actually would be appropriate.

<ras>I've been known to be overzealous :-)  Particularly when I'm new to a
system.
It's still in my mind that the write way to handle this is by correctly
categorizing the message, and setting the Log4J properties file
appropriately.
</ras>

(this particular situation should have been ERROR output anyway, not DEBUG
- perhaps we could add an argument to AxisFault.dump() to take a priority,
or split it into logDebug()/logError())

<ras>A week ago or so, I took a stab at removing AxisFault.dump(),
and using AxisFault.dumpToString() only.  I dropped it when I realized that
there were a number of dependencies I didn't fully understand at that time.
I'd like to propose that I go back and remove AxisFault.dump(), and call
AxisFault.dumpToString() using appropriate log/print statements as required
by the caller...
</ras>



--Glen

> -----Original Message-----
> From: Richard Sitze [mailto:rsitze@us.ibm.com]
> Sent: Tuesday, March 12, 2002 4:25 PM
> To: axis-dev@xml.apache.org
> Subject: Recent change to stock/GetQuote.java
>
>
> I can understand your desire to see this for your immediate
> purposes, but
> this solution is counter productive when you integrate AXIS into a
> production environment or product.
>
> If you prefer, I would be happy to enable DEBUG output to an
> "axis.log"
> file, but not to the screen (Rich, who sits some 3 feet
> behind me, will
> likely whack the back of my head if I start dumping such lines to the
> console).
>
> I think the pattern that seems most innocuous is to be notified of the
> error on the console, and dig through the log for the details.  If the
> community has another opinion then I think it should be debated as a
> "design point", rather than tweeking individual lines to help.
>
> <ras>
>
> *******************************************
> Richard A. Sitze            rsitze@us.ibm.com
> CORBA Interoperability & WebServices
> IBM WebSphere Development
>
>
>
>
>                       dug@apache.org
>
>                                                To:
> xml-axis-cvs@apache.org
>                       03/12/2002 03:00         cc:
>
>                       PM                       Subject: cvs
> commit: xml-axis/java/samples/stock
>                       Please respond           GetQuote.java
>
>                       to axis-dev
>
>
>
>
>
>
>
>
>
> dug         02/03/12 13:00:34
>
>   Modified:    java/samples/stock GetQuote.java
>   Log:
>   Make error message go to the screen instead of some mystery log file
>   that newbies will never find.
>
>   Revision  Changes    Path
>   1.38      +1 -1      xml-axis/java/samples/stock/GetQuote.java
>
>   Index: GetQuote.java
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote.java,v
>   retrieving revision 1.37
>   retrieving revision 1.38
>   diff -u -r1.37 -r1.38
>   --- GetQuote.java            8 Feb 2002 22:14:11 -0000
>      1.37
>   +++ GetQuote.java            12 Mar 2002 21:00:34 -0000
>      1.38
>   @@ -138,7 +138,7 @@
>        }
>        catch( Exception e ) {
>            if ( e instanceof AxisFault ) {
>   -            ((AxisFault)e).dump();
>   +            System.err.println( ((AxisFault)e).dumpToString() );
>            } else
>                e.printStackTrace();
>        }
>
>
>
>
>
>





Mime
View raw message