From: Diogo Franco (Kovensky) Date: Tue, 16 Jul 2013 15:39:12 +0000 (-0300) Subject: http, udp: Remove debug logging X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=5af9623e92d04d1b4d717bfcc5fe4e09c2da261a;p=go-anidb.git http, udp: Remove debug logging Keep complaints about unknown resource types though, but mention that it comes from the HTTP API. --- diff --git a/http/anime.go b/http/anime.go index 8c609bd..a815d63 100644 --- a/http/anime.go +++ b/http/anime.go @@ -68,8 +68,8 @@ func GetAnime(AID int) (a Anime, err error) { case 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15: // documentation knows about these default: - log.Printf("Anime %d (%s) has unknown resource type %d", a.ID, title, r.Type) - log.Printf("Type %d external entities: %#v", r.Type, r.ExternalEntity) + log.Printf("HTTP -- Anime %d (%s) has unknown resource type %d", a.ID, title, r.Type) + log.Printf("HTTP -- Type %d external entities: %#v", r.Type, r.ExternalEntity) } } @@ -92,7 +92,6 @@ func doRequest(request string, reqMap reqMap) (*http.Response, error) { u, _ := url.Parse(aniDBHTTPAPIBaseURL) u.RawQuery = v.Encode() - log.Println(u.String()) return http.Get(u.String()) } diff --git a/udp/comm.go b/udp/comm.go index 1017c69..74b07cd 100755 --- a/udp/comm.go +++ b/udp/comm.go @@ -11,7 +11,6 @@ import ( "compress/zlib" "fmt" "io" - "log" "net" "sort" "strings" @@ -130,8 +129,6 @@ func (a *AniDBUDP) SendRecv(command string, args ParamMap) <-chan APIReply { reply <- newErrorWrapper(TimeoutError) close(reply) - - log.Println("!!! Timeout") case r := <-ch: a.routerLock.Lock() delete(a.tagRouter, tag) @@ -184,7 +181,6 @@ func (a *AniDBUDP) send(command string, args ParamMap) chan bool { if len(arg) > 0 { str = strings.Join([]string{command, arg}, " ") } - log.Println(">>>", str) p := makePacket([]byte(str), a.ecb) @@ -268,7 +264,6 @@ func (a *AniDBUDP) recvLoop() { a.routerLock.RLock() if ch, ok := a.tagRouter[r.Tag()]; ok { - log.Println("<<<", string(b)) ch <- r } else { c := r.Code() @@ -295,7 +290,6 @@ func (a *AniDBUDP) recvLoop() { // NOTIFYACK reply, ignore } else { // untagged error, broadcast to all - log.Println("