From 787ea5d0eebe4cc2ebec393f7a8e0947a8cb65ad Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Fri, 8 Aug 2014 00:16:00 +0200 Subject: [PATCH] Mute logging a bit. --- leveldb.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/leveldb.go b/leveldb.go index ac9d373..07a126a 100644 --- a/leveldb.go +++ b/leveldb.go @@ -72,11 +72,11 @@ func (ldbs *LevelDBSession) Fetch(hash, key []byte) (value []byte, err error) { ldbs.backend.doRead(func(db *leveldb.DB) { ro := leveldb.NewReadOptions() value, err = ldbs.backend.db.Get(ro, key) - if err != nil { - log.Printf("Fetch key = '%s' len(value) = %d\n", key, len(value)) - } else { - log.Printf("Fetch key '%s' failed.\n", key) - } + //if err != nil { + // log.Printf("Fetch key '%s' failed.\n", key) + //} else { + // log.Printf("Fetch key = '%s' len(value) = %d\n", key, len(value)) + //} ro.Close() }) return @@ -105,12 +105,12 @@ func (ldbs *LevelDBSession) Store(hash, key, value []byte) (exists bool, err err } if ldbs.tx != nil { - log.Printf("Stored in tx: key = '%s' len(value) = %d\n", key, len(value)) + //log.Printf("Stored in tx: key = '%s' len(value) = %d\n", key, len(value)) ldbs.tx.Put(key, value) return } - log.Printf("Stored: key = '%s' len(value) = %d\n", key, len(value)) + //log.Printf("Stored: key = '%s' len(value) = %d\n", key, len(value)) wo := leveldb.NewWriteOptions() err = ldbs.backend.db.Put(wo, key, value) wo.Close()