Add debugging utilities
This commit is contained in:
parent
18fe8eee60
commit
b3d23a0f36
2 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue