List of usage examples for java.util.logging Handler setFilter
public synchronized void setFilter(Filter newFilter) throws SecurityException
From source file:de.ailis.jasdoc.Main.java
/** * Initializes logging./* w ww . j a v a 2s. c om*/ */ private void initLogging() { final Logger logger = Logger.getLogger("de.ailis.jasdoc"); logger.setUseParentHandlers(false); final Handler handler = new LogHandler(); handler.setFilter(null); handler.setFormatter(new LogFormatter(this.debug)); if (this.debug) handler.setLevel(Level.ALL); else if (this.quiet) handler.setLevel(Level.WARNING); else handler.setLevel(Level.INFO); logger.setFilter(null); logger.addHandler(handler); Logger.getLogger("").setLevel(handler.getLevel()); }