1 19 20 package org.netbeans.modules.exceptions.listeners; 21 22 import java.util.logging.Handler ; 23 import java.util.logging.Level ; 24 import java.util.logging.LogRecord ; 25 import org.netbeans.modules.exceptions.Collector; 26 27 31 public class UIHandler extends Handler { 32 private final Collector coll; 33 private static final String NAME = org.openide.util.NbBundle.getMessage(org.netbeans.modules.exceptions.ExceptionsHandler.class, "UIHandler"); 34 35 public UIHandler(Collector _coll) { 36 setLevel(Level.FINEST); 37 coll = _coll; 38 } 39 40 public void publish(LogRecord record) { 41 record.setLoggerName(NAME); 42 coll.write(record); 43 } 44 45 public void flush() { 46 } 47 48 public void close() throws SecurityException { 49 } 50 51 } | Popular Tags |