Logger pkgLogger = Logger.getLogger( OdaJdbcDriver.class.getPackage().getName() );
String className = OdaJdbcDriver.class.getName( ); Logger pkgLogger = Logger.getLogger( className.substring( 0, className.lastIndexOf( "." ) ) );
	public void setLogConfiguration( LogConfiguration logConfig )			throws OdaException	{		final String methodName = "setLogConfiguration";			    // Get logger for this driver package		Logger pkgLogger = Logger.getLogger( OdaJdbcDriver.class.getPackage().getName() );                // determine driver package log level;        // if a valid value is configured, set it in package logger        switch( logConfig.getLogLevel() )        {        case Level.ALL:            pkgLogger.setLevel( java.util.logging.Level.ALL );            break;        case Level.FINEST:            pkgLogger.setLevel( java.util.logging.Level.FINEST );            break;        case Level.FINER:            pkgLogger.setLevel( java.util.logging.Level.FINER );            break;        case Level.FINE:            pkgLogger.setLevel( java.util.logging.Level.FINE );            break;        case Level.CONFIG:            pkgLogger.setLevel( java.util.logging.Level.CONFIG );            break;        case Level.INFO:            pkgLogger.setLevel( java.util.logging.Level.INFO );            break;        case Level.WARNING:            pkgLogger.setLevel( java.util.logging.Level.WARNING );            break;        case Level.SEVERE:            pkgLogger.setLevel( java.util.logging.Level.SEVERE );            break;        case Level.OFF:            pkgLogger.setLevel( java.util.logging.Level.OFF );            break;        default:        	{            if( logConfig.getLogLevel() > Level.SEVERE )                pkgLogger.setLevel( java.util.logging.Level.OFF );            else            	// preserve the existing log level                logger.logp( java.util.logging.Level.WARNING, className,                    methodName, logConfig.getLogLevel() + " is not a valid log level." );            break;        	}        }                    	// if logging is OFF, no need to setup package handler or formatter        if( pkgLogger.getLevel() == java.util.logging.Level.OFF )            return;		// done        // Create handler, if one doesn't already exist        Handler handler = setLogHandler( pkgLogger, logConfig );        if( handler == null )        {            logger.logp( java.util.logging.Level.WARNING, className,                    methodName, "Cannot create log handler for package." );            return;        }        // set handler log level to that of package logger        if( pkgLogger.getLevel() != null )            handler.setLevel( pkgLogger.getLevel() );                // setup log formatter, if configured                String formatterClassName = logConfig.getFormatterClassName();        if( formatterClassName == null || formatterClassName.length() == 0 )        {            return; // done, no need to set log formatter        }        // if existing formatter is of the same type as        // configured formatter class, we are done        if( handler.getFormatter() != null &&            formatterClassName.equals(                     handler.getFormatter().getClass().getName() ) )        {            return;        }        // assign new formatter to handler        try        {            Class formatterClass = Class.forName( formatterClassName );            handler.setFormatter( (Formatter) formatterClass.newInstance() );        }        catch( Exception ex )        {            logger.logp( java.util.logging.Level.WARNING, className,                    methodName, "Cannot setup Formatter object.", ex );        }	}