Add debugging utilities

This commit is contained in:
Hamcha 2016-02-09 10:34:59 +00:00
parent 18fe8eee60
commit b3d23a0f36
2 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,7 @@ func handleClient(c net.Conn) {
err = json.Unmarshal(bytes, &cmd)
if err != nil {
log.Printf("[handleClient] Can't parse JSON: %s\r\n", err.Error())
log.Println(string(bytes))
continue
}
executeClientCommand(cmd)

View File

@ -27,6 +27,7 @@ func CreateBrokerClient(brokerAddr string, updateFn UpdateHandler) error {
err = json.Unmarshal(bytes, &update)
if err != nil {
log.Printf("[tg - CreateBrokerClient] ERROR reading JSON: %s\r\n", err.Error())
log.Println(string(bytes))
}
// Dispatch to UpdateHandler