log.error(e);
System.err.println(e);
    public static void main(String[] args) throws Exception {        String arg;        int port=8080;        Router router=null;        InetAddress address=null;        System.out.println("Router is starting...");        for(int i=0; i < args.length; i++) {            arg=args[i];            if("-help".equals(arg)) {                System.out.println("Router [-port <port>] [-bindaddress <address>]");                return;            }            else                if("-port".equals(arg)) {                    port=Integer.parseInt(args[++i]);                }                else                    if("-bindaddress".equals(arg)) {                        address=InetAddress.getByName(args[++i]);                    }        }        try {            if(address == null) router=new Router(port); else router=new Router(port, address);            router.start();            System.out.println("Router was created at " + new Date());            System.out.println("Listening on port " + port + " and bound to address " + address);        }        catch(Exception e) {            log.error(e);        }    }