public static void main(String[] args)
	{

		Log.instance().configureLogFile("miniweb", 2);
		String debug="OFF";
		String iniFilename="mw.ini";
		for(final String arg : args)
		{
			if(arg.startsWith("BOOT="))
				iniFilename=arg.substring(5);
		}

		MiniWebConfig config;
		try
		{
			config=MiniWebServer.createConfig(Log.instance(), new FileInputStream(iniFilename));
		}
		catch (final Exception e)
		{
			e.printStackTrace();
			System.exit(-1);
			return; // an unhit operation, but my ide is argueing with me over it.
		}

		debug=config.getDebugFlag();

		for(final String arg : args)
		{
			if(arg.equalsIgnoreCase("DEBUG"))
			{
				debug="BOTH";
				config.setDebugFlag(debug);
			}
		}
		Log.instance().configureLog(Log.Type.info, "BOTH");
		Log.instance().configureLog(Log.Type.error, "BOTH");
		Log.instance().configureLog(Log.Type.warning, "BOTH");
		Log.instance().configureLog(Log.Type.debug, debug);
		Log.instance().configureLog(Log.Type.access, config.getAccessLogFlag());
		config.getLogger().info("Starting "+NAME+" "+VERSION);

		final MiniWebServer server = new MiniWebServer("server", config);
		config.setMiniWebServer(server);
		final Thread t = new MWThread(config, server, NAME);
		t.start();
		try
		{
			t.join();
		}
		catch(final InterruptedException e)
		{
			e.printStackTrace(System.err);
		}
	}