Filter.java |
1 /* 2 * %W% %E% 3 * 4 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 5 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 9 package java.util.logging; 10 11 /** 12 * A Filter can be used to provide fine grain control over 13 * what is logged, beyond the control provided by log levels. 14 * <p> 15 * Each Logger and each Handler can have a filter associated with it. 16 * The Logger or Handler will call the isLoggable method to check 17 * if a given LogRecord should be published. If isLoggable returns 18 * false, the LogRecord will be discarded. 19 * 20 * @version %I%, %G% 21 * @since 1.4 22 */ 23 24 public interface Filter { 25 26 /** 27 * Check if a given log record should be published. 28 * @param record a LogRecord 29 * @return true if the log record should be published. 30 */ 31 public boolean isLoggable(LogRecord record); 32 33 } 34