Decapitalized log.Debug messages
According to golang standards, these should not be capitalized nor having a trailing period, AFAIK. License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Richard Littauer committed
Jun 14, 2016 at 12:20 UTC
b6a3435bb54b54beab904182bc30f8fc26adbcdb
15 files changed
+26
-26
blockservice/blockservice.go
+3
-3
@@ -86,7 +86,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
86
if err == blockstore.ErrNotFound && s.Exchange != nil {
87
// TODO be careful checking ErrNotFound. If the underlying
88
// implementation changes, this will break.
89
- log.Debug("Blockservice: Searching bitswap.")
89
+ log.Debug("Blockservice: Searching bitswap")
90
blk, err := s.Exchange.GetBlock(ctx, k)
91
if err != nil {
92
if err == blockstore.ErrNotFound {
@@ -97,7 +97,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
97
return blk, nil
98
}
99
100
- log.Debug("Blockservice GetBlock: Not found.")
100
+ log.Debug("Blockservice GetBlock: Not found")
101
if err == blockstore.ErrNotFound {
102
return nil, ErrNotFound
103
}
@@ -119,7 +119,7 @@ func (s *BlockService) GetBlocks(ctx context.Context, ks []key.Key) <-chan block
119
misses = append(misses, k)
120
continue
121
}
122
- log.Debug("Blockservice: Got data in datastore.")
122
+ log.Debug("Blockservice: Got data in datastore")
123
select {
124
case out <- hit:
125
case <-ctx.Done():
cmd/ipfs/init.go
+1
-1
@@ -51,7 +51,7 @@ environment variable:
51
52
log.Info("checking if daemon is running...")
53
if daemonLocked {
54
- log.Debug("Ipfs daemon is running.")
54
+ log.Debug("ipfs daemon is running")
55
e := "ipfs daemon is running. please stop it to run this command"
56
return cmds.ClientError(e)
57
}
cmd/ipfs/main.go
+3
-3
@@ -288,7 +288,7 @@ func (i *cmdInvocation) requestedHelp() (short bool, long bool, err error) {
288
func callPreCommandHooks(ctx context.Context, details cmdDetails, req cmds.Request, root *cmds.Command) error {
289
290
log.Event(ctx, "callPreCommandHooks", &details)
291
- log.Debug("Calling pre-command hooks...")
291
+ log.Debug("calling pre-command hooks...")
292
293
return nil
294
}
@@ -325,7 +325,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
325
}
326
327
if client != nil && !cmd.External {
328
- log.Debug("Executing command via API")
328
+ log.Debug("executing command via API")
329
res, err = client.Send(req)
330
if err != nil {
331
if isConnRefused(err) {
@@ -335,7 +335,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
335
}
336
337
} else {
338
- log.Debug("Executing command locally")
338
+ log.Debug("executing command locally")
339
340
err := req.SetRootContext(ctx)
341
if err != nil {
commands/http/handler.go
+2
-2
@@ -120,11 +120,11 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
120
}
121
122
func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
123
- log.Debug("Incoming API request: ", r.URL)
123
+ log.Debug("incoming API request: ", r.URL)
124
125
defer func() {
126
if r := recover(); r != nil {
127
- log.Error("A panic has occurred in the commands handler!")
127
+ log.Error("a panic has occurred in the commands handler!")
128
log.Error(r)
129
130
debug.PrintStack()
core/commands/publish.go
+1
-1
@@ -58,7 +58,7 @@ Publish an <ipfs-path> to another public key (not implemented):
58
cmds.StringOption("ttl", "Time duration this record should be cached for (caution: experimental)."),
59
},
60
Run: func(req cmds.Request, res cmds.Response) {
61
- log.Debug("Begin Publish")
61
+ log.Debug("begin publish")
62
n, err := req.InvocContext().GetNode()
63
if err != nil {
64
res.SetError(err, cmds.ErrNormal)
diagnostics/diag.go
+3
-3
@@ -135,7 +135,7 @@ func newID() string {
135
136
// GetDiagnostic runs a diagnostics request across the entire network
137
func (d *Diagnostics) GetDiagnostic(ctx context.Context, timeout time.Duration) ([]*DiagInfo, error) {
138
- log.Debug("Getting diagnostic.")
138
+ log.Debug("getting diagnostic")
139
ctx, cancel := context.WithTimeout(ctx, timeout)
140
defer cancel()
141
@@ -144,7 +144,7 @@ func (d *Diagnostics) GetDiagnostic(ctx context.Context, timeout time.Duration)
144
d.diagMap[diagID] = time.Now()
145
d.diagLock.Unlock()
146
147
- log.Debug("Begin Diagnostic")
147
+ log.Debug("begin diagnostic")
148
149
peers := d.getPeers()
150
log.Debugf("Sending diagnostic request to %d peers.", len(peers))
@@ -236,7 +236,7 @@ func (d *Diagnostics) getDiagnosticFromPeer(ctx context.Context, p peer.ID, pmes
236
return
237
}
238
if rpmes == nil {
239
- log.Debug("Got no response back from diag request.")
239
+ log.Debug("got no response back from diag request")
240
return
241
}
242
fuse/ipns/ipns_unix.go
+2
-2
@@ -55,7 +55,7 @@ func NewFileSystem(ipfs *core.IpfsNode, sk ci.PrivKey, ipfspath, ipnspath string
55
56
// Root constructs the Root of the filesystem, a Root object.
57
func (f *FileSystem) Root() (fs.Node, error) {
58
- log.Debug("Filesystem, get root")
58
+ log.Debug("filesystem, get root")
59
return f.RootNode, nil
60
}
61
@@ -417,7 +417,7 @@ func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
417
func (fi *File) Forget() {
418
err := fi.fi.Sync()
419
if err != nil {
420
- log.Debug("Forget file error: ", err)
420
+ log.Debug("forget file error: ", err)
421
}
422
}
423
fuse/readonly/readonly_unix.go
+2
-2
@@ -70,7 +70,7 @@ func (s *Root) Lookup(ctx context.Context, name string) (fs.Node, error) {
70
71
// ReadDirAll reads a particular directory. Disallowed for root.
72
func (*Root) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
73
- log.Debug("Read Root.")
73
+ log.Debug("read Root")
74
return nil, fuse.EPERM
75
}
76
@@ -89,7 +89,7 @@ func (s *Node) loadData() error {
89
90
// Attr returns the attributes of a given node.
91
func (s *Node) Attr(ctx context.Context, a *fuse.Attr) error {
92
- log.Debug("Node attr.")
92
+ log.Debug("Node attr")
93
if s.cached == nil {
94
if err := s.loadData(); err != nil {
95
return fmt.Errorf("readonly: loadData() failed: %s", err)
namesys/publisher.go
+1
-1
@@ -314,7 +314,7 @@ func ValidateIpnsRecord(k key.Key, val []byte) error {
314
case pb.IpnsEntry_EOL:
315
t, err := u.ParseRFC3339(string(entry.GetValidity()))
316
if err != nil {
317
- log.Debug("Failed parsing time for ipns record EOL")
317
+ log.Debug("failed parsing time for ipns record EOL")
318
return err
319
}
320
if time.Now().After(t) {
path/resolver.go
+1
-1
@@ -86,7 +86,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]*me
86
return nil, err
87
}
88
89
- log.Debug("Resolve dag get.")
89
+ log.Debug("resolve dag get")
90
nd, err := s.DAG.Get(ctx, key.Key(h))
91
if err != nil {
92
return nil, err
routing/dht/dht.go
+1
-1
@@ -267,7 +267,7 @@ func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) [
267
// == to self? thats bad
268
for _, p := range closer {
269
if p == dht.self {
270
- log.Debug("Attempted to return self! this shouldnt happen...")
270
+ log.Debug("attempted to return self! this shouldn't happen...")
271
return nil
272
}
273
}
routing/dht/dht_net.go
+1
-1
@@ -54,7 +54,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
54
55
// if nil response, return it before serializing
56
if rpmes == nil {
57
- log.Debug("Got back nil response from request.")
57
+ log.Debug("got back nil response from request")
58
continue
59
}
60
routing/dht/handlers.go
+1
-1
@@ -108,7 +108,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
108
rec := new(pb.Record)
109
err = proto.Unmarshal(byts, rec)
110
if err != nil {
111
- log.Debug("Failed to unmarshal DHT record from datastore.")
111
+ log.Debug("failed to unmarshal DHT record from datastore")
112
return nil, err
113
}
114
routing/dht/records.go
+1
-1
@@ -84,7 +84,7 @@ func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.Pub
84
// validity because a) we can't. b) we know the hash of the
85
// key we're looking for.
86
val := record.GetValue()
87
- log.Debug("DHT got a value from other peer.")
87
+ log.Debug("DHT got a value from other peer")
88
89
pk, err = ci.UnmarshalPublicKey(val)
90
if err != nil {
routing/dht/routing.go
+3
-3
@@ -46,7 +46,7 @@ func (dht *IpfsDHT) PutValue(ctx context.Context, key key.Key, value []byte) err
46
47
rec, err := record.MakePutRecord(sk, key, value, sign)
48
if err != nil {
49
- log.Debug("Creation of record failed!")
49
+ log.Debug("creation of record failed!")
50
return err
51
}
52
@@ -346,7 +346,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
346
select {
347
case peerOut <- prov:
348
case <-ctx.Done():
349
- log.Debug("Context timed out sending more providers")
349
+ log.Debug("context timed out sending more providers")
350
return nil, ctx.Err()
351
}
352
}
@@ -397,7 +397,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
397
// Sanity...
398
for _, p := range peers {
399
if p == id {
400
- log.Debug("Found target peer in list of closest peers...")
400
+ log.Debug("found target peer in list of closest peers...")
401
return dht.peerstore.PeerInfo(p), nil
402
}
403
}