You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tim Johnson <Ti...@Sunquest.com> on 2001/11/12 20:58:40 UTC

Debug info not being displayed

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;
                }
            }
        }


Re: Debug info not being displayed

Posted by Omar Benjelloun <om...@inria.fr>.
Hi,

Could you explain briefly how to display debug info ?

I tryed copying log4j.properties into WEB-INF/classes and restarted Tomcat,
but still, nothing appears in my console.

Thanks,

Omar

I tryed copy
----- Original Message -----
From: "Tim Johnson" <Ti...@Sunquest.com>
To: <ax...@xml.apache.org>
Sent: Monday, November 12, 2001 8:58 PM
Subject: Debug info not being displayed


> 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;
>                 }
>             }
>         }
>
>