private static void initializeLogger ( Logger logger ) { // Do NOT send any logging information to parent loggers. topLogger . setUseParentHandlers ( false ) ; // Remove any existing handlers. for ( Handler handler : topLogger . getHandlers ( ) ) { try { topLogger . removeHandler ( handler ) ; } catch ( SecurityException consumed ) { System . err . println ( "WARNING: missing 'LoggingPermission(\"control\")' permission" ) ; } } }
Remove all handlers associated with the given logger .