@cryptotaxi247 / kubo / commits / 4b086eff5

Remove Notice{,f} logging interface

And substitute the lines using Notice{,f} with Info{,f} License: MIT Signed-off-by: rht <rhtbot@gmail.com>

rht committed Jun 12, 2015 at 04:48 UTC 4b086eff5a33c30d9552dcec25a66f4d116a5154
7 files changed +10 -12
core/commands/log.go
+1 -1
@@ -45,7 +45,7 @@ output of a running daemon.
45 // TODO use a different keyword for 'all' because all can theoretically
46 // clash with a subsystem name
47 cmds.StringArg("subsystem", true, false, fmt.Sprintf("the subsystem logging identifier. Use '%s' for all subsystems.", logAllKeyword)),
48 - cmds.StringArg("level", true, false, "one of: debug, info, notice, warning, error, fatal"),
48 + cmds.StringArg("level", true, false, "one of: debug, info, warning, error, fatal"),
49 },
50 Run: func(req cmds.Request, res cmds.Response) {
51
exchange/bitswap/bitswap.go
+2 -2
@@ -280,7 +280,7 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
280 var keys []key.Key
281 for _, block := range iblocks {
282 if _, found := bs.wm.wl.Contains(block.Key()); !found {
283 - log.Notice("received un-asked-for block: %s", block)
283 + log.Info("received un-asked-for block: %s", block)
284 continue
285 }
286 keys = append(keys, block.Key())
@@ -297,7 +297,7 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
297 has, err := bs.blockstore.Has(b.Key())
298 if err != nil {
299 bs.counterLk.Unlock()
300 - log.Noticef("blockstore.Has error: %s", err)
300 + log.Infof("blockstore.Has error: %s", err)
301 return
302 }
303 if err == nil && has {
exchange/bitswap/wantmanager.go
+3 -3
@@ -96,7 +96,7 @@ func (pm *WantManager) SendBlock(ctx context.Context, env *engine.Envelope) {
96 log.Infof("Sending block %s to %s", env.Peer, env.Block)
97 err := pm.network.SendMessage(ctx, env.Peer, msg)
98 if err != nil {
99 - log.Noticef("sendblock error: %s", err)
99 + log.Infof("sendblock error: %s", err)
100 }
101 }
102
@@ -153,7 +153,7 @@ func (mq *msgQueue) doWork(ctx context.Context) {
153
154 err := mq.network.ConnectTo(conctx, mq.p)
155 if err != nil {
156 - log.Noticef("cant connect to peer %s: %s", mq.p, err)
156 + log.Infof("cant connect to peer %s: %s", mq.p, err)
157 // TODO: cant connect, what now?
158 return
159 }
@@ -174,7 +174,7 @@ func (mq *msgQueue) doWork(ctx context.Context) {
174 // send wantlist updates
175 err = mq.network.SendMessage(sendctx, mq.p, wlm)
176 if err != nil {
177 - log.Noticef("bitswap send error: %s", err)
177 + log.Infof("bitswap send error: %s", err)
178 // TODO: what do we do if this fails?
179 return
180 }
ipnsfs/system.go
+1 -1
@@ -80,7 +80,7 @@ func (fs *Filesystem) Close() error {
80 defer wg.Done()
81 err := r.Publish(context.TODO())
82 if err != nil {
83 - log.Notice(err)
83 + log.Info(err)
84 return
85 }
86 }(r)
routing/dht/dht_test.go
+1 -1
@@ -773,7 +773,7 @@ func TestConnectCollision(t *testing.T) {
773 runTimes := 10
774
775 for rtime := 0; rtime < runTimes; rtime++ {
776 - log.Notice("Running Time: ", rtime)
776 + log.Info("Running Time: ", rtime)
777
778 ctx := context.Background()
779
thirdparty/eventlog/log.go
-2
@@ -19,8 +19,6 @@ type StandardLogger interface {
19 Fatalf(format string, args ...interface{})
20 Info(args ...interface{})
21 Infof(format string, args ...interface{})
22 - Notice(args ...interface{})
23 - Noticef(format string, args ...interface{})
22 Panic(args ...interface{})
23 Panicf(format string, args ...interface{})
24 Warning(args ...interface{})
updates/updates.go
+2 -2
@@ -210,7 +210,7 @@ func CliCheckForUpdates(cfg *config.Config, repoPath string) error {
210 // if there is no update available, record it, and exit. NB: only record
211 // if we checked successfully.
212 if err == ErrNoUpdateAvailable {
213 - log.Noticef("No update available, checked on %s", time.Now())
213 + log.Infof("No update available, checked on %s", time.Now())
214 r, err := fsrepo.Open(repoPath)
215 if err != nil {
216 return err
@@ -238,7 +238,7 @@ func CliCheckForUpdates(cfg *config.Config, repoPath string) error {
238 if cfg.Version.AutoUpdate != config.AutoUpdateNever {
239 // and we should auto update
240 if ShouldAutoUpdate(cfg.Version.AutoUpdate, u.Version) {
241 - log.Noticef("Applying update %s", u.Version)
241 + log.Infof("Applying update %s", u.Version)
242
243 if err = Apply(u); err != nil {
244 log.Debug(err)