View Javadoc

1   package org.lsst.ccs.utilities.logging;
2   
3   import java.io.IOException;
4   import java.util.logging.LogRecord;
5   import java.util.logging.SocketHandler;
6   
7   /**
8    * A <TT>SocketHandler</TT> that detects duplicate publications.Y
9    * @author bamade
10   */
11  // Date: 29/05/13
12  
13  public class SocketHandlerN extends SocketHandler {
14      public SocketHandlerN() throws IOException {
15          super();
16      }
17  
18      public SocketHandlerN(String host, int port) throws IOException {
19          super(host, port);
20      }
21      protected IsLoggableDelegate isLoggableDelegate = new IsLoggableDelegate();
22      @Override
23      public boolean isLoggable(LogRecord record) {
24          return super.isLoggable(record) && isLoggableDelegate.isLoggable(record) ;
25      }
26  }