]> git.lizzy.rs Git - go-anidb.git/commitdiff
anidb: Remove debug logging from cache
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 16:17:28 +0000 (13:17 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 16:17:28 +0000 (13:17 -0300)
cache.go

index 0679a7d14efafc3d0ee270a75685290fc08d331a..bdbe6f8973596bf6a970b35cb8930fd5c848d6d2 100644 (file)
--- a/cache.go
+++ b/cache.go
@@ -7,7 +7,6 @@ import (
        "errors"
        "fmt"
        "io"
-       "log"
        "os"
        "path"
        "reflect"
@@ -16,8 +15,6 @@ import (
        "time"
 )
 
-var _ log.Logger
-
 type Cacheable interface {
        // Updates the last modified time
        Touch()
@@ -142,9 +139,6 @@ func (c *cacheDir) DeleteAll(keys ...cacheKey) (err error) {
 }
 
 func (c *cacheDir) Get(v Cacheable, keys ...cacheKey) (err error) {
-       defer func() {
-               log.Println("Got entry", keys, "(error", err, ")")
-       }()
 
        val := reflect.ValueOf(v)
        if k := val.Kind(); k == reflect.Ptr || k == reflect.Interface {
@@ -213,9 +207,6 @@ func (c *cacheDir) Set(v Cacheable, keys ...cacheKey) (n int64, err error) {
                        return // no point in saving nil
                }
        }
-       defer func() {
-               log.Println("Set entry", keys, "(error", err, ")")
-       }()
 
        // First we encode to memory -- we don't want to create/truncate a file and put bad data in it.
        buf := bytes.Buffer{}