© aQute, All Rights Reserved 1.2a Use The ServiceTracker Change the log() method to use the tracker void log( String msg, Throwable exception ) { try { LogService log =(LogService) tracker.waitForService(15000); if ( exception == null ) log.log( LogService.LOG_INFO, msg ); else log.log( LogService.LOG_ERROR, msg, exception ); return; } catch ( InterruptedException ie ) {} System.out.println( msg + : + exception ); }
{}