code: public static void main(String[] args) {
      if (args.length == 3 && "-getlevel".equals(args[0])) {
        process("http://" + args[1] + "/logLevel?log=" + args[2]);
        return;
      }
      else if (args.length == 4 && "-setlevel".equals(args[0])) {
        process("http://" + args[1] + "/logLevel?log=" + args[2]
                + "&level=" + args[3]);
        return;
      }
  
      System.err.println(USAGES);
      System.exit(-1);
    }
docs: A command line implementation