avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/CORBA/kernel DefaultLoader.java
Date Sat, 02 Mar 2002 04:51:13 GMT
mcconnell    02/03/01 20:51:13

  Modified:    enterprise/orb/src/java/org/apache/orb/CORBA/kernel
                        DefaultLoader.java
  Log:
  updated to sync with modified Trace methods
  
  Revision  Changes    Path
  1.2       +29 -39    jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/CORBA/kernel/DefaultLoader.java
  
  Index: DefaultLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/CORBA/kernel/DefaultLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultLoader.java	28 Feb 2002 16:29:38 -0000	1.1
  +++ DefaultLoader.java	2 Mar 2002 04:51:12 -0000	1.2
  @@ -267,6 +267,8 @@
   
               Configurator conf = new Configurator( args, properties, m_logger.getChildLogger("configurator")
);
               m_properties = conf.getProperties();
  +
  +            configureDebuggingLevels( );
               load_initializers( cargs, conf.getInitializers() );
   
               targs[ 2 ] = ORBInitializer[].class;
  @@ -285,10 +287,6 @@
   
           m_init_info.pre_init();
   
  -        // set the stack trace option
  -        org.openorb.util.Trace.setShowStackTrace( 
  -          m_properties.getBooleanProperty( "openorb.debug.ShowStackTrace", false ) );
  -
           try
           {
               ORBConnector orb_connector = ( ORBConnector ) constructClass( 
  @@ -301,11 +299,36 @@
                 "Exception during construction of ORBConnectorClass", ex );
           }
   
  -        enableTrace();
  -        if( m_logger.isDebugEnabled() && Trace.isHigh() ) m_logger.debug("loading
orb");
  +        if( m_logger.isDebugEnabled() && Trace.isLow() ) m_logger.debug("loading
orb");
           m_init_info.post_init();
       }
   
  +    private void configureDebuggingLevels( )
  +    {
  +        // get the trace level from the properties and set it for the VM
  +        int debugLevel = m_properties.getIntProperty( "Verbose", -1 );
  +        if( debugLevel == -1 )
  +            debugLevel = getIntProperty( "openorb.debug", 0 );
  +        org.openorb.util.Trace.setDebugLevel( debugLevel );
  +
  +        // print the logging header
  +        if ( m_logger.isDebugEnabled() )
  +        {
  +            m_logger.debug(
  +                "\n"
  +              + "-----------------------------------------------------------------\n"
  +              + "OpenORB\n"
  +              + "DebugVerbosityLevel (LOW/MEDIUM/HIGH): " + 
  +                   org.openorb.util.Trace.getNameOfDebugLevel( debugLevel ) + " (" + debugLevel
+ ")\n"
  +              + "-----------------------------------------------------------------\n" );
  +            display_configuration( m_logger );
  +            m_logger.debug(
  +                "\n"
  +              + "-----------------------------------------------------------------" 
  +            );
  +        }
  +    }
  +
       /**
        * This operation is used to display an OpenORB configuration.
        */
  @@ -320,39 +343,6 @@
       public void display_configuration( Logger logger )
       {
           m_properties.display( logger );
  -    }
  -
  -    /**
  -     * Activate a default trace mode
  -     */
  -    private void enableTrace()
  -    {
  -        int traceLevel;
  -
  -        try
  -        {
  -            traceLevel = getIntProperty( "Verbose" );
  -        }
  -        catch ( org.openorb.CORBA.kernel.PropertyNotFoundException ex )
  -        {
  -            traceLevel = getIntProperty( "openorb.debug", 0 );
  -        }
  -
  -        if ( traceLevel != 0 ) Trace.setTraceLevel( traceLevel );
  -        if ( m_logger.isDebugEnabled() && Trace.isHigh() )
  -        {
  -            m_logger.debug(
  -                "\n----------------------------------------------------------------------------------------"
  -              + "\nOpenORB debugging session "
  -              + "\nSession : Intra verbose mode"
  -              + "\n----------------------------------------------------------------------------------------"
  -              + "\nCurrent configuration :"
  -            );
  -            display_configuration( m_logger );
  -            m_logger.debug(
  -                "\n----------------------------------------------------------------------------------------"

  -            );
  -        }
       }
   
       // ---------------------------------------------------------------------
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message