improve log print

This commit is contained in:
rui.zheng 2015-06-05 17:24:22 +08:00
parent 8f9f4d99ec
commit 6f7ed09099

View File

@ -61,7 +61,7 @@ func (conn *HttpClientConn) Handshake() (err error) {
return err
}
if uuid.Parse(string(b)) == nil {
return errors.New("wrong token")
return errors.New("Handshake: wrong token")
}
conn.token = string(b)
conn.r = resp.Body
@ -98,7 +98,7 @@ func (conn *HttpClientConn) Write(b []byte) (n int, err error) {
resp.Body.Close()
if resp.StatusCode != http.StatusOK {
log.Println(resp.Status)
//log.Println(resp.Status)
return 0, errors.New(resp.Status)
}
//log.Println("http w:", len(b))