Use v.log rather than log for consistency. (#464)

Change made to keep the use of logging consistent.
This commit is contained in:
NamedKitten 2017-10-23 19:20:07 +01:00 committed by Chris Rhodes
parent 8737777ce7
commit 70c6c583e4

View file

@ -13,7 +13,6 @@ import (
"encoding/binary" "encoding/binary"
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"net" "net"
"strings" "strings"
"sync" "sync"
@ -104,7 +103,7 @@ func (v *VoiceConnection) Speaking(b bool) (err error) {
defer v.Unlock() defer v.Unlock()
if err != nil { if err != nil {
v.speaking = false v.speaking = false
log.Println("Speaking() write json error:", err) v.log(LogError, "Speaking() write json error:", err)
return return
} }
@ -181,7 +180,7 @@ func (v *VoiceConnection) Close() {
v.log(LogInformational, "closing udp") v.log(LogInformational, "closing udp")
err := v.udpConn.Close() err := v.udpConn.Close()
if err != nil { if err != nil {
log.Println("error closing udp connection: ", err) v.log(LogError, "error closing udp connection: ", err)
} }
v.udpConn = nil v.udpConn = nil
} }