KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > util > logging > Filter


1 /*
2  * @(#)Filter.java 1.5 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN 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 1.5, 12/19/03
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 JavaDoc record);
32
33 }
34
Popular Tags