code: public static void setLoggingLevel(final Level level) {
      final Handler[] handlers = Logger.getLogger("").getHandlers();
      ConsoleHandler ch = null;
      for (final Handler h : handlers) {
        if (h instanceof ConsoleHandler) {
          ch = (ConsoleHandler) h;
          break;
        }
      }
      if (ch == null) {
        ch = new ConsoleHandler();
        Logger.getLogger("").addHandler(ch);
      }
      ch.setLevel(level);
      Logger.getLogger("").setLevel(level);
    }
docs: Sets the logging level.
  
  @param level the logging level