axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Johnson <Tim.John...@Sunquest.com>
Subject Getting debug data to show
Date Mon, 12 Nov 2001 19:45:28 GMT
I couldn't get the debug stuff to show, so I stepped thru the code and I
think
I know why: In the Options construct we should be calling isValueSet instead
os isFlagSet. isValueSet will return my new priority of 4, where as
isFlagSet
always returns 1. I know this is pretty trival, but I thought I would let
someone
know.

This is from 11/9 nightly build:
 
 public Options(String _args[]) throws MalformedURLException {
        args = _args ;
        usedArgs = null ;
        defaultURL = new
URL("http://localhost:8080/axis/servlet/AxisServlet");
        
 
///////////////////////////////////////////////////////////////////////
        // SOASS

        /* Process these well known options first */
        /******************************************/
        try {
            getURL();
        } catch( MalformedURLException e ) {
            category.error( "getURL failed to correctly process URL;
protocol not " +
                            "supported" );
            throw e ;
        }
        getUser();
        getPassword();

        // Increase log4j verbosity based on number of "-d" options
specified.
        //int debug = isFlagSet('d');
        int debug = isValueSet('d');
        if (debug>0) {
            Priority[] allPriorities = Priority.getAllPossiblePriorities(); 
            Priority currentPriority = Category.getRoot().getPriority();
            for (int i=0; i<allPriorities.length; i++) {
                if (currentPriority == allPriorities[i]) {
                    i += debug;
                    if (i>=allPriorities.length) i=allPriorities.length-1;
                    Category.getRoot().setPriority(allPriorities[i]);
                    break;
                }
            }
        }

Mime
View raw message