]> git.lizzy.rs Git - go-anidb.git/commitdiff
http, udp: Remove debug logging
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 15:39:12 +0000 (12:39 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 15:39:12 +0000 (12:39 -0300)
Keep complaints about unknown resource types though, but mention that it
comes from the HTTP API.

http/anime.go
udp/comm.go

index 8c609bd67e4fd0fa11c7bd9853953a20fb1c1741..a815d6394e7c089791ae55c5a188394b06222460 100644 (file)
@@ -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())
 }
 
index 1017c69006aebac83b6da80c0cf6fc0aac76ad5c..74b07cd295119094fbe9330243a45f080915a7b0 100755 (executable)
@@ -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("<!<", string(b))
                                                for _, ch := range a.tagRouter {
                                                        ch <- r
                                                }