@cryptotaxi247 / kubo / commits / c67286774

silence verbose output

for higher SnR at IPFS_LOGGING=info License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Dec 8, 2014 at 02:55 UTC c67286774c7eb7ee834cab900335a73b155102e6
4 files changed +11 -11
net/conn/conn.go
+1 -1
@@ -31,7 +31,7 @@ const (
31 // ReleaseBuffer puts the given byte array back into the buffer pool,
32 // first verifying that it is the correct size
33 func ReleaseBuffer(b []byte) {
34 - log.Warningf("Releasing buffer! (cap,size = %d, %d)", cap(b), len(b))
34 + log.Debugf("Releasing buffer! (cap,size = %d, %d)", cap(b), len(b))
35 mpool.ByteSlicePool.Put(uint32(cap(b)), b)
36 }
37
net/conn/multiconn.go
+7 -7
@@ -69,7 +69,7 @@ func (c *MultiConn) Add(conns ...Conn) {
69 defer c.Unlock()
70
71 for _, c2 := range conns {
72 - log.Infof("MultiConn: adding %s", c2)
72 + log.Debugf("MultiConn: adding %s", c2)
73 if c.LocalPeer() != c2.LocalPeer() || c.RemotePeer() != c2.RemotePeer() {
74 log.Error(c2)
75 c.Unlock() // ok to unlock (to log). panicing.
@@ -86,7 +86,7 @@ func (c *MultiConn) Add(conns ...Conn) {
86 c.Children().Add(1)
87 c2.Children().Add(1) // yep, on the child too.
88 go c.fanInSingle(c2)
89 - log.Infof("MultiConn: added %s", c2)
89 + log.Debugf("MultiConn: added %s", c2)
90 }
91 }
92
@@ -149,7 +149,7 @@ func (c *MultiConn) fanOut() {
149 // send data out through our "best connection"
150 case m, more := <-c.duplex.Out:
151 if !more {
152 - log.Infof("%s out channel closed", c)
152 + log.Debugf("%s out channel closed", c)
153 return
154 }
155 sc := c.BestConn()
@@ -159,7 +159,7 @@ func (c *MultiConn) fanOut() {
159 }
160
161 i++
162 - log.Infof("%s sending (%d)", sc, i)
162 + log.Debugf("%s sending (%d)", sc, i)
163 sc.Out() <- m
164 }
165 }
@@ -170,7 +170,7 @@ func (c *MultiConn) fanOut() {
170 func (c *MultiConn) fanInSingle(child Conn) {
171 // cleanup all data associated with this child Connection.
172 defer func() {
173 - log.Infof("closing: %s", child)
173 + log.Debugf("closing: %s", child)
174
175 // in case it still is in the map, remove it.
176 c.Lock()
@@ -197,7 +197,7 @@ func (c *MultiConn) fanInSingle(child Conn) {
197
198 case m, more := <-child.In(): // receiving data
199 if !more {
200 - log.Infof("%s in channel closed", child)
200 + log.Debugf("%s in channel closed", child)
201 err := c.GetError()
202 if err != nil {
203 log.Errorf("Found error on connection: %s", err)
@@ -205,7 +205,7 @@ func (c *MultiConn) fanInSingle(child Conn) {
205 return // closed
206 }
207 i++
208 - log.Infof("%s received (%d)", child, i)
208 + log.Debugf("%s received (%d)", child, i)
209 c.duplex.In <- m
210 }
211 }
net/swarm/addrs.go
+1 -1
@@ -61,7 +61,7 @@ func resolveUnspecifiedAddresses(unspecifiedAddrs []ma.Multiaddr) ([]ma.Multiadd
61 }
62 return eventlog.Metadata{"addresses": addrs}
63 }())
64 - log.Info("InterfaceListenAddresses:", outputAddrs)
64 + log.Debug("InterfaceListenAddresses:", outputAddrs)
65 return outputAddrs, nil
66 }
67
routing/dht/routing.go
+2 -2
@@ -274,10 +274,10 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (peer.Peer, error)
274 // Ping a peer, log the time it took
275 func (dht *IpfsDHT) Ping(ctx context.Context, p peer.Peer) error {
276 // Thoughts: maybe this should accept an ID and do a peer lookup?
277 - log.Infof("ping %s start", p)
277 + log.Debugf("ping %s start", p)
278
279 pmes := pb.NewMessage(pb.Message_PING, "", 0)
280 _, err := dht.sendRequest(ctx, p, pmes)
281 - log.Infof("ping %s end (err = %s)", p, err)
281 + log.Debugf("ping %s end (err = %s)", p, err)
282 return err
283 }