mil.dod.th.ose.logging/src/mil/dod/th/ose/logging/JavaLoggerBridge.java
@Activate
    public void activate(final BundleContext context)
    {
        //framework property
        final String prop = context.getProperty(ENABLED_FRAMEWORK_PROPERTY);
        
        //if the property from the context is null then use default of true
        final boolean enabled = prop == null ? true : Boolean.parseBoolean(prop);
        
        //if enabled is true then register this class as a logging handler
        if (enabled)
        {
            final Logger rootLogger = Logger.getLogger("");
            final Handler[] handlers = rootLogger.getHandlers().clone();
            
            for (Handler handler : handlers)
            {
                rootLogger.removeHandler(handler);
            }
            
            rootLogger.addHandler(this);
        }
    }
/**
     * Activate this component by removing all logger handlers and replace with this one.
     * 
     * @param context
     *      the bundle context for this bundle
     */
Activate this component by removing all logger handlers and replace with this one.

@param context
the bundle context for this bundle
Activate this component by removing all logger handlers and replace with this one . @param context the bundle context for this bundle
@Activate
    public void activate(final BundleContext context)
    {
        final String prop = context.getProperty(ENABLED_FRAMEWORK_PROPERTY);
        final boolean enabled = prop == null ? true : Boolean.parseBoolean(prop);
        if (enabled)
        {
            final Logger rootLogger = Logger.getLogger("");
            final Handler[] handlers = rootLogger.getHandlers().clone();
            for (Handler handler : handlers)
            {
                rootLogger.removeHandler(handler);
            }
            rootLogger.addHandler(this);
        }
    }
@ Activate public void activate ( final BundleContext context ) { final String prop = context . getProperty ( ENABLED_FRAMEWORK_PROPERTY ) ; final boolean enabled = prop == null ? true : Boolean . parseBoolean ( prop ) ; if ( enabled ) { final Logger rootLogger = Logger . getLogger ( "" ) ; final Handler [ ] handlers = rootLogger . getHandlers ( ) . clone ( ) ; for ( Handler handler : handlers ) { rootLogger . removeHandler ( handler ) ; } rootLogger . addHandler ( this ) ; } }
Activate this component by removing all logger handlers and replace with this one.
Activate this component by removing all logger handlers and replace with this one .
//framework property //if the property from the context is null then use default of true //if enabled is true then register this class as a logging handler