Code example for Logger

Methods: addHandlersetUseParentHandlers

0
 
  static { 
    Handler handler = new ConsoleHandler();
    handler.setLevel(Level.ALL);
    handler.setFormatter(new LogFormatter());
    Debug.LOGGER.addHandler(handler);
    Debug.LOGGER.setUseParentHandlers(false);
  } 
 
  private Debug() {} 
 
  /** 
   * Sets the log level to the given level, or, if invalid, level 5. 
   * 
   * @param l The level to set logging to, between 5 and 10. 
   */ 
  public static void setLogLevel(int l) {
    Level level;
    switch(l) {
      case 9: 
      case 10: