public static void main(String[] args) {
		try {
			if (args.length != 6) {
				logger.error("Error! Invalid number of arguments!");
				logger.error("Usage: Server <name> <port> <ZooKeeper Port> <ECS IP> <isLoadReplica> <parentName>!");
				System.exit(1);
			} else {
				String name = args[0];
				int port = Integer.parseInt(args[1]);
				int zkPort = Integer.parseInt(args[2]);
				String ECSIP = args[3];
				boolean isLoadReplica = Boolean.parseBoolean(args[4]);
				String parentName = args[5];
				SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
				new LogSetup("logs/" + name + "_" + fmt.format(new Date()) + ".log", Level.ALL, true);
				// No need to use the run method here since the contructor is supposed to
				// start the server on its own
				// TODO: Allow passing additional arguments from the command line:
				new KVServer(START_CACHE_SIZE, START_CACHE_STRATEGY, name, port, zkPort, ECSIP, isLoadReplica, parentName);
			}
		} catch (IOException e) {
			System.out.println("Error! Unable to initialize logger!");
			e.printStackTrace();
			System.exit(1);
		} catch (NumberFormatException nfe) {
			System.out.println("Error! Invalid argument <port>! Not a number!");
			System.out.println("Usage: Server <port>!");
			System.exit(1);
		}
	}
public static void main(String[] args) {
		try {
			if (args.length != 6) {
				logger.error("Error! Invalid number of arguments!");
				logger.error("Usage: Server <name> <port> <ZooKeeper Port> <ECS IP> <isLoadReplica> <parentName>!");
				System.exit(1);
			} else {
				String name = args[0];
				int port = Integer.parseInt(args[1]);
				int zkPort = Integer.parseInt(args[2]);
				String ECSIP = args[3];
				boolean isLoadReplica = Boolean.parseBoolean(args[4]);
				String parentName = args[5];
				SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
				new LogSetup("logs/" + name + "_" + fmt.format(new Date()) + ".log", Level.ALL, true);
			
			
			
				new KVServer(START_CACHE_SIZE, START_CACHE_STRATEGY, name, port, zkPort, ECSIP, isLoadReplica, parentName);
			}
		} catch (IOException e) {
			System.out.println("Error! Unable to initialize logger!");
			e.printStackTrace();
			System.exit(1);
		} catch (NumberFormatException nfe) {
			System.out.println("Error! Invalid argument <port>! Not a number!");
			System.out.println("Usage: Server <port>!");
			System.exit(1);
		}
	}
public static void main(string[] args) { try { if (args.length != 6) { logger.error("error! invalid number of arguments!"); logger.error("usage: server <name> <port> <zookeeper port> <ecs ip> <isloadreplica> <parentname>!"); system.exit(1); } else { string name = args[0]; int port = integer.parseint(args[1]); int zkport = integer.parseint(args[2]); string ecsip = args[3]; boolean isloadreplica = boolean.parseboolean(args[4]); string parentname = args[5]; simpledateformat fmt = new simpledateformat("yyyy-mm-dd-hh-mm-ss"); new logsetup("logs/" + name + "_" + fmt.format(new date()) + ".log", level.all, true); new kvserver(start_cache_size, start_cache_strategy, name, port, zkport, ecsip, isloadreplica, parentname); } } catch (ioexception e) { system.out.println("error! unable to initialize logger!"); e.printstacktrace(); system.exit(1); } catch (numberformatexception nfe) { system.out.println("error! invalid argument <port>! not a number!"); system.out.println("usage: server <port>!"); system.exit(1); } }