Skip to content

Commit b6a3435

Browse files
committed
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 <[email protected]>
1 parent 79e9bd8 commit b6a3435

File tree

15 files changed

+26
-26
lines changed

15 files changed

+26
-26
lines changed

blockservice/blockservice.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
8686
if err == blockstore.ErrNotFound && s.Exchange != nil {
8787
// TODO be careful checking ErrNotFound. If the underlying
8888
// implementation changes, this will break.
89-
log.Debug("Blockservice: Searching bitswap.")
89+
log.Debug("Blockservice: Searching bitswap")
9090
blk, err := s.Exchange.GetBlock(ctx, k)
9191
if err != nil {
9292
if err == blockstore.ErrNotFound {
@@ -97,7 +97,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
9797
return blk, nil
9898
}
9999

100-
log.Debug("Blockservice GetBlock: Not found.")
100+
log.Debug("Blockservice GetBlock: Not found")
101101
if err == blockstore.ErrNotFound {
102102
return nil, ErrNotFound
103103
}
@@ -119,7 +119,7 @@ func (s *BlockService) GetBlocks(ctx context.Context, ks []key.Key) <-chan block
119119
misses = append(misses, k)
120120
continue
121121
}
122-
log.Debug("Blockservice: Got data in datastore.")
122+
log.Debug("Blockservice: Got data in datastore")
123123
select {
124124
case out <- hit:
125125
case <-ctx.Done():

cmd/ipfs/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ environment variable:
5151

5252
log.Info("checking if daemon is running...")
5353
if daemonLocked {
54-
log.Debug("Ipfs daemon is running.")
54+
log.Debug("ipfs daemon is running")
5555
e := "ipfs daemon is running. please stop it to run this command"
5656
return cmds.ClientError(e)
5757
}

cmd/ipfs/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (i *cmdInvocation) requestedHelp() (short bool, long bool, err error) {
288288
func callPreCommandHooks(ctx context.Context, details cmdDetails, req cmds.Request, root *cmds.Command) error {
289289

290290
log.Event(ctx, "callPreCommandHooks", &details)
291-
log.Debug("Calling pre-command hooks...")
291+
log.Debug("calling pre-command hooks...")
292292

293293
return nil
294294
}
@@ -325,7 +325,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
325325
}
326326

327327
if client != nil && !cmd.External {
328-
log.Debug("Executing command via API")
328+
log.Debug("executing command via API")
329329
res, err = client.Send(req)
330330
if err != nil {
331331
if isConnRefused(err) {
@@ -335,7 +335,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
335335
}
336336

337337
} else {
338-
log.Debug("Executing command locally")
338+
log.Debug("executing command locally")
339339

340340
err := req.SetRootContext(ctx)
341341
if err != nil {

commands/http/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
120120
}
121121

122122
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)
124124

125125
defer func() {
126126
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!")
128128
log.Error(r)
129129

130130
debug.PrintStack()

core/commands/publish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Publish an <ipfs-path> to another public key (not implemented):
5858
cmds.StringOption("ttl", "Time duration this record should be cached for (caution: experimental)."),
5959
},
6060
Run: func(req cmds.Request, res cmds.Response) {
61-
log.Debug("Begin Publish")
61+
log.Debug("begin publish")
6262
n, err := req.InvocContext().GetNode()
6363
if err != nil {
6464
res.SetError(err, cmds.ErrNormal)

diagnostics/diag.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func newID() string {
135135

136136
// GetDiagnostic runs a diagnostics request across the entire network
137137
func (d *Diagnostics) GetDiagnostic(ctx context.Context, timeout time.Duration) ([]*DiagInfo, error) {
138-
log.Debug("Getting diagnostic.")
138+
log.Debug("getting diagnostic")
139139
ctx, cancel := context.WithTimeout(ctx, timeout)
140140
defer cancel()
141141

@@ -144,7 +144,7 @@ func (d *Diagnostics) GetDiagnostic(ctx context.Context, timeout time.Duration)
144144
d.diagMap[diagID] = time.Now()
145145
d.diagLock.Unlock()
146146

147-
log.Debug("Begin Diagnostic")
147+
log.Debug("begin diagnostic")
148148

149149
peers := d.getPeers()
150150
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
236236
return
237237
}
238238
if rpmes == nil {
239-
log.Debug("Got no response back from diag request.")
239+
log.Debug("got no response back from diag request")
240240
return
241241
}
242242

fuse/ipns/ipns_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func NewFileSystem(ipfs *core.IpfsNode, sk ci.PrivKey, ipfspath, ipnspath string
5555

5656
// Root constructs the Root of the filesystem, a Root object.
5757
func (f *FileSystem) Root() (fs.Node, error) {
58-
log.Debug("Filesystem, get root")
58+
log.Debug("filesystem, get root")
5959
return f.RootNode, nil
6060
}
6161

@@ -417,7 +417,7 @@ func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
417417
func (fi *File) Forget() {
418418
err := fi.fi.Sync()
419419
if err != nil {
420-
log.Debug("Forget file error: ", err)
420+
log.Debug("forget file error: ", err)
421421
}
422422
}
423423

fuse/readonly/readonly_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (s *Root) Lookup(ctx context.Context, name string) (fs.Node, error) {
7070

7171
// ReadDirAll reads a particular directory. Disallowed for root.
7272
func (*Root) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
73-
log.Debug("Read Root.")
73+
log.Debug("read Root")
7474
return nil, fuse.EPERM
7575
}
7676

@@ -89,7 +89,7 @@ func (s *Node) loadData() error {
8989

9090
// Attr returns the attributes of a given node.
9191
func (s *Node) Attr(ctx context.Context, a *fuse.Attr) error {
92-
log.Debug("Node attr.")
92+
log.Debug("Node attr")
9393
if s.cached == nil {
9494
if err := s.loadData(); err != nil {
9595
return fmt.Errorf("readonly: loadData() failed: %s", err)

namesys/publisher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func ValidateIpnsRecord(k key.Key, val []byte) error {
314314
case pb.IpnsEntry_EOL:
315315
t, err := u.ParseRFC3339(string(entry.GetValidity()))
316316
if err != nil {
317-
log.Debug("Failed parsing time for ipns record EOL")
317+
log.Debug("failed parsing time for ipns record EOL")
318318
return err
319319
}
320320
if time.Now().After(t) {

path/resolver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]*me
8686
return nil, err
8787
}
8888

89-
log.Debug("Resolve dag get.")
89+
log.Debug("resolve dag get")
9090
nd, err := s.DAG.Get(ctx, key.Key(h))
9191
if err != nil {
9292
return nil, err

routing/dht/dht.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) [
267267
// == to self? thats bad
268268
for _, p := range closer {
269269
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...")
271271
return nil
272272
}
273273
}

routing/dht/dht_net.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
5454

5555
// if nil response, return it before serializing
5656
if rpmes == nil {
57-
log.Debug("Got back nil response from request.")
57+
log.Debug("got back nil response from request")
5858
continue
5959
}
6060

routing/dht/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
108108
rec := new(pb.Record)
109109
err = proto.Unmarshal(byts, rec)
110110
if err != nil {
111-
log.Debug("Failed to unmarshal DHT record from datastore.")
111+
log.Debug("failed to unmarshal DHT record from datastore")
112112
return nil, err
113113
}
114114

routing/dht/records.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.Pub
8484
// validity because a) we can't. b) we know the hash of the
8585
// key we're looking for.
8686
val := record.GetValue()
87-
log.Debug("DHT got a value from other peer.")
87+
log.Debug("DHT got a value from other peer")
8888

8989
pk, err = ci.UnmarshalPublicKey(val)
9090
if err != nil {

routing/dht/routing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (dht *IpfsDHT) PutValue(ctx context.Context, key key.Key, value []byte) err
4646

4747
rec, err := record.MakePutRecord(sk, key, value, sign)
4848
if err != nil {
49-
log.Debug("Creation of record failed!")
49+
log.Debug("creation of record failed!")
5050
return err
5151
}
5252

@@ -346,7 +346,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
346346
select {
347347
case peerOut <- prov:
348348
case <-ctx.Done():
349-
log.Debug("Context timed out sending more providers")
349+
log.Debug("context timed out sending more providers")
350350
return nil, ctx.Err()
351351
}
352352
}
@@ -397,7 +397,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
397397
// Sanity...
398398
for _, p := range peers {
399399
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...")
401401
return dht.peerstore.PeerInfo(p), nil
402402
}
403403
}

0 commit comments

Comments
 (0)