Fixed messages logging
This commit is contained in:
parent
3a000d3e86
commit
ac68bc64b4
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package vk
|
package vk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
@ -26,8 +27,7 @@ func Message(userId int64, message string) {
|
||||||
log.Print("Could not send message\n user: %lld", userId)
|
log.Print("Could not send message\n user: %lld", userId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var responseBytes []byte
|
responseBytes, _ := ioutil.ReadAll(resp.Body)
|
||||||
_, _ = resp.Body.Read(responseBytes)
|
|
||||||
log.Printf("Message sent\n user: %d\n message: %s\n server response: %s", userId, message,
|
log.Printf("Message sent\n user: %d\n message: %s\n server response: %s", userId, message,
|
||||||
string(responseBytes))
|
string(responseBytes))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue