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. package java.util.logging;
  8. /**
  9. * A Filter can be used to provide fine grain control over
  10. * what is logged, beyond the control provided by log levels.
  11. * <p>
  12. * Each Logger and each Handler can have a filter associated with it.
  13. * The Logger or Handler will call the isLoggable method to check
  14. * if a given LogRecord should be published. If isLoggable returns
  15. * false, the LogRecord will be discarded.
  16. *
  17. * @version 1.5, 12/19/03
  18. * @since 1.4
  19. */
  20. public interface Filter {
  21. /**
  22. * Check if a given log record should be published.
  23. * @param record a LogRecord
  24. * @return true if the log record should be published.
  25. */
  26. public boolean isLoggable(LogRecord record);
  27. }