List of usage examples for java.util.logging Logger GLOBAL_LOGGER_NAME
String GLOBAL_LOGGER_NAME
To view the source code for java.util.logging Logger GLOBAL_LOGGER_NAME.
Click Source Link
From source file:processing.app.Base.java
static public void initLogger() { Handler consoleHandler = new ConsoleLogger(); consoleHandler.setLevel(Level.ALL); consoleHandler.setFormatter(new LogFormatter("%1$tl:%1$tM:%1$tS [%4$7s] %2$s: %5$s%n")); Logger globalLogger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); globalLogger.setLevel(consoleHandler.getLevel()); // Remove default Handler[] handlers = globalLogger.getHandlers(); for (Handler handler : handlers) { globalLogger.removeHandler(handler); }// w ww .j a v a2 s.c o m Logger root = Logger.getLogger(""); handlers = root.getHandlers(); for (Handler handler : handlers) { root.removeHandler(handler); } globalLogger.addHandler(consoleHandler); Logger.getLogger("cc.arduino.packages.autocomplete").setParent(globalLogger); Logger.getLogger("br.com.criativasoft.cpluslibparser").setParent(globalLogger); Logger.getLogger(Base.class.getPackage().getName()).setParent(globalLogger); }