func main() {
	http.HandleFunc("/command/", cmdHandler)
	var err error
	lw, err = logger.NewLogger("ExampleServer", logger.LevelInfo)
	if err != nil {
		fmt.Printf("Cannot create logger instance %s", err.Error())
		panic("die")
	}
	lw.EnableKeys([]string{ES})
	lw.SetFile()
	sc, err = stats.NewStatsCollector(ES)
	if err != nil {
		lw.LogError("", ES, "Unable to initialize stats module %s", err.Error())
	}

	sc.AddStatKey("Requests", 0)
	sc.AddStatKey("Success", 0)
	sc.AddStatKey("Failures", 0)
	sc.AddStatKey("Server Port", 9191)
	sc.AddStatKey("bytesReceived", 0)
	sc.AddStatKey("bytesSent", 0)

	lw.LogInfo("", ES, "Example Server starting on port 9191")
	http.ListenAndServe(":9191", nil)
}
func main() {
	var err error
	lw, err = logger.NewLogger("ExampleClient", logger.LevelInfo)
	if err != nil {
		fmt.Printf("Cannot create logger instance %s", err.Error())
		panic("die")
	}
	lw.EnableKeys([]string{EC})
	lw.SetFile()
	sc, err = stats.NewStatsCollector(EC)
	if err != nil {
		lw.LogError("", EC, "Unable to initialize stats module %s", err.Error())
	}

	sc.AddStatKey(STAT_REQUESTS, 0)
	sc.AddStatKey(STAT_FAILURES, 0)
	sc.AddStatKey(STAT_BYTESTRANS, 0)
	sc.AddStatKey(STAT_BYTESRECEIVED, 0)
	do_requests(1, "http://localhost:9191/command/")
}