@SuppressWarnings("unchecked")
    public void install(final BundleContext osgiContext) {
        if (tracker != null) {
            throw new IllegalStateException("ConsoleLogManager already installed.");
        }
        tracker = new ServiceTracker<LogReaderService,LogReaderService>(osgiContext, LogReaderService.class.getName(),
            new ServiceTrackerCustomizer<LogReaderService,LogReaderService>() {

            @Override
            public LogReaderService addingService(ServiceReference<LogReaderService> reference) {
                LogReaderService service = osgiContext.getService(reference);
                service.addLogListener(listener);
                return service;
            }

            @Override
            public void modifiedService(ServiceReference<LogReaderService> reference, LogReaderService service) {

            }

            @Override
            public void removedService(ServiceReference<LogReaderService> reference, LogReaderService service) {
                service.removeLogListener(listener);
            }
        });
        tracker.open();
    }
@author <a href="mailto:vikasp@yahoo-inc.com">Vikas Panwar</a>
jdisc_core/src/main/java/com/yahoo/jdisc/core/ConsoleLogManager.java