Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
0f3ae073
提交
0f3ae073
authored
6月 17, 2016
作者:
Jeromy Johnson
提交者:
GitHub
6月 17, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2853 from ipfs/feature/decapitalize-Debug
Decapitalized log.Debug messages
上级
868a1e36
b6a3435b
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
26 行增加
和
26 行删除
+26
-26
blockservice.go
blockservice/blockservice.go
+3
-3
init.go
cmd/ipfs/init.go
+1
-1
main.go
cmd/ipfs/main.go
+3
-3
handler.go
commands/http/handler.go
+2
-2
publish.go
core/commands/publish.go
+1
-1
diag.go
diagnostics/diag.go
+3
-3
ipns_unix.go
fuse/ipns/ipns_unix.go
+2
-2
readonly_unix.go
fuse/readonly/readonly_unix.go
+2
-2
publisher.go
namesys/publisher.go
+1
-1
resolver.go
path/resolver.go
+1
-1
dht.go
routing/dht/dht.go
+1
-1
dht_net.go
routing/dht/dht_net.go
+1
-1
handlers.go
routing/dht/handlers.go
+1
-1
records.go
routing/dht/records.go
+1
-1
routing.go
routing/dht/routing.go
+3
-3
没有找到文件。
blockservice/blockservice.go
浏览文件 @
0f3ae073
...
...
@@ -86,7 +86,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
if
err
==
blockstore
.
ErrNotFound
&&
s
.
Exchange
!=
nil
{
// TODO be careful checking ErrNotFound. If the underlying
// implementation changes, this will break.
log
.
Debug
(
"Blockservice: Searching bitswap
.
"
)
log
.
Debug
(
"Blockservice: Searching bitswap"
)
blk
,
err
:=
s
.
Exchange
.
GetBlock
(
ctx
,
k
)
if
err
!=
nil
{
if
err
==
blockstore
.
ErrNotFound
{
...
...
@@ -97,7 +97,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k key.Key) (blocks.Block, e
return
blk
,
nil
}
log
.
Debug
(
"Blockservice GetBlock: Not found
.
"
)
log
.
Debug
(
"Blockservice GetBlock: Not found"
)
if
err
==
blockstore
.
ErrNotFound
{
return
nil
,
ErrNotFound
}
...
...
@@ -119,7 +119,7 @@ func (s *BlockService) GetBlocks(ctx context.Context, ks []key.Key) <-chan block
misses
=
append
(
misses
,
k
)
continue
}
log
.
Debug
(
"Blockservice: Got data in datastore
.
"
)
log
.
Debug
(
"Blockservice: Got data in datastore"
)
select
{
case
out
<-
hit
:
case
<-
ctx
.
Done
()
:
...
...
cmd/ipfs/init.go
浏览文件 @
0f3ae073
...
...
@@ -54,7 +54,7 @@ environment variable:
log
.
Info
(
"checking if daemon is running..."
)
if
daemonLocked
{
log
.
Debug
(
"
Ipfs daemon is running.
"
)
log
.
Debug
(
"
ipfs daemon is running
"
)
e
:=
"ipfs daemon is running. please stop it to run this command"
return
cmds
.
ClientError
(
e
)
}
...
...
cmd/ipfs/main.go
浏览文件 @
0f3ae073
...
...
@@ -288,7 +288,7 @@ func (i *cmdInvocation) requestedHelp() (short bool, long bool, err error) {
func
callPreCommandHooks
(
ctx
context
.
Context
,
details
cmdDetails
,
req
cmds
.
Request
,
root
*
cmds
.
Command
)
error
{
log
.
Event
(
ctx
,
"callPreCommandHooks"
,
&
details
)
log
.
Debug
(
"
C
alling pre-command hooks..."
)
log
.
Debug
(
"
c
alling pre-command hooks..."
)
return
nil
}
...
...
@@ -325,7 +325,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
}
if
client
!=
nil
&&
!
cmd
.
External
{
log
.
Debug
(
"
E
xecuting command via API"
)
log
.
Debug
(
"
e
xecuting command via API"
)
res
,
err
=
client
.
Send
(
req
)
if
err
!=
nil
{
if
isConnRefused
(
err
)
{
...
...
@@ -335,7 +335,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command, cmd
}
}
else
{
log
.
Debug
(
"
E
xecuting command locally"
)
log
.
Debug
(
"
e
xecuting command locally"
)
err
:=
req
.
SetRootContext
(
ctx
)
if
err
!=
nil
{
...
...
commands/http/handler.go
浏览文件 @
0f3ae073
...
...
@@ -120,11 +120,11 @@ func (i Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
func
(
i
internalHandler
)
ServeHTTP
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
log
.
Debug
(
"
I
ncoming API request: "
,
r
.
URL
)
log
.
Debug
(
"
i
ncoming API request: "
,
r
.
URL
)
defer
func
()
{
if
r
:=
recover
();
r
!=
nil
{
log
.
Error
(
"
A
panic has occurred in the commands handler!"
)
log
.
Error
(
"
a
panic has occurred in the commands handler!"
)
log
.
Error
(
r
)
debug
.
PrintStack
()
...
...
core/commands/publish.go
浏览文件 @
0f3ae073
...
...
@@ -58,7 +58,7 @@ Publish an <ipfs-path> to another public key (not implemented):
cmds
.
StringOption
(
"ttl"
,
"Time duration this record should be cached for (caution: experimental)."
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
log
.
Debug
(
"
Begin P
ublish"
)
log
.
Debug
(
"
begin p
ublish"
)
n
,
err
:=
req
.
InvocContext
()
.
GetNode
()
if
err
!=
nil
{
res
.
SetError
(
err
,
cmds
.
ErrNormal
)
...
...
diagnostics/diag.go
浏览文件 @
0f3ae073
...
...
@@ -135,7 +135,7 @@ func newID() string {
// GetDiagnostic runs a diagnostics request across the entire network
func
(
d
*
Diagnostics
)
GetDiagnostic
(
ctx
context
.
Context
,
timeout
time
.
Duration
)
([]
*
DiagInfo
,
error
)
{
log
.
Debug
(
"
Getting diagnostic.
"
)
log
.
Debug
(
"
getting diagnostic
"
)
ctx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
timeout
)
defer
cancel
()
...
...
@@ -144,7 +144,7 @@ func (d *Diagnostics) GetDiagnostic(ctx context.Context, timeout time.Duration)
d
.
diagMap
[
diagID
]
=
time
.
Now
()
d
.
diagLock
.
Unlock
()
log
.
Debug
(
"
Begin D
iagnostic"
)
log
.
Debug
(
"
begin d
iagnostic"
)
peers
:=
d
.
getPeers
()
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
return
}
if
rpmes
==
nil
{
log
.
Debug
(
"
Got no response back from diag request.
"
)
log
.
Debug
(
"
got no response back from diag request
"
)
return
}
...
...
fuse/ipns/ipns_unix.go
浏览文件 @
0f3ae073
...
...
@@ -55,7 +55,7 @@ func NewFileSystem(ipfs *core.IpfsNode, sk ci.PrivKey, ipfspath, ipnspath string
// Root constructs the Root of the filesystem, a Root object.
func
(
f
*
FileSystem
)
Root
()
(
fs
.
Node
,
error
)
{
log
.
Debug
(
"
F
ilesystem, get root"
)
log
.
Debug
(
"
f
ilesystem, get root"
)
return
f
.
RootNode
,
nil
}
...
...
@@ -417,7 +417,7 @@ func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
func
(
fi
*
File
)
Forget
()
{
err
:=
fi
.
fi
.
Sync
()
if
err
!=
nil
{
log
.
Debug
(
"
F
orget file error: "
,
err
)
log
.
Debug
(
"
f
orget file error: "
,
err
)
}
}
...
...
fuse/readonly/readonly_unix.go
浏览文件 @
0f3ae073
...
...
@@ -70,7 +70,7 @@ func (s *Root) Lookup(ctx context.Context, name string) (fs.Node, error) {
// ReadDirAll reads a particular directory. Disallowed for root.
func
(
*
Root
)
ReadDirAll
(
ctx
context
.
Context
)
([]
fuse
.
Dirent
,
error
)
{
log
.
Debug
(
"
Read Root.
"
)
log
.
Debug
(
"
read Root
"
)
return
nil
,
fuse
.
EPERM
}
...
...
@@ -89,7 +89,7 @@ func (s *Node) loadData() error {
// Attr returns the attributes of a given node.
func
(
s
*
Node
)
Attr
(
ctx
context
.
Context
,
a
*
fuse
.
Attr
)
error
{
log
.
Debug
(
"Node attr
.
"
)
log
.
Debug
(
"Node attr"
)
if
s
.
cached
==
nil
{
if
err
:=
s
.
loadData
();
err
!=
nil
{
return
fmt
.
Errorf
(
"readonly: loadData() failed: %s"
,
err
)
...
...
namesys/publisher.go
浏览文件 @
0f3ae073
...
...
@@ -314,7 +314,7 @@ func ValidateIpnsRecord(k key.Key, val []byte) error {
case
pb
.
IpnsEntry_EOL
:
t
,
err
:=
u
.
ParseRFC3339
(
string
(
entry
.
GetValidity
()))
if
err
!=
nil
{
log
.
Debug
(
"
F
ailed parsing time for ipns record EOL"
)
log
.
Debug
(
"
f
ailed parsing time for ipns record EOL"
)
return
err
}
if
time
.
Now
()
.
After
(
t
)
{
...
...
path/resolver.go
浏览文件 @
0f3ae073
...
...
@@ -86,7 +86,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]*me
return
nil
,
err
}
log
.
Debug
(
"
Resolve dag get.
"
)
log
.
Debug
(
"
resolve dag get
"
)
nd
,
err
:=
s
.
DAG
.
Get
(
ctx
,
key
.
Key
(
h
))
if
err
!=
nil
{
return
nil
,
err
...
...
routing/dht/dht.go
浏览文件 @
0f3ae073
...
...
@@ -267,7 +267,7 @@ func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) [
// == to self? thats bad
for
_
,
p
:=
range
closer
{
if
p
==
dht
.
self
{
log
.
Debug
(
"
Attempted to return self! this shouldn
t happen..."
)
log
.
Debug
(
"
attempted to return self! this shouldn'
t happen..."
)
return
nil
}
}
...
...
routing/dht/dht_net.go
浏览文件 @
0f3ae073
...
...
@@ -54,7 +54,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
// if nil response, return it before serializing
if
rpmes
==
nil
{
log
.
Debug
(
"
Got back nil response from request.
"
)
log
.
Debug
(
"
got back nil response from request
"
)
continue
}
...
...
routing/dht/handlers.go
浏览文件 @
0f3ae073
...
...
@@ -108,7 +108,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
rec
:=
new
(
pb
.
Record
)
err
=
proto
.
Unmarshal
(
byts
,
rec
)
if
err
!=
nil
{
log
.
Debug
(
"
Failed to unmarshal DHT record from datastore.
"
)
log
.
Debug
(
"
failed to unmarshal DHT record from datastore
"
)
return
nil
,
err
}
...
...
routing/dht/records.go
浏览文件 @
0f3ae073
...
...
@@ -84,7 +84,7 @@ func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.Pub
// validity because a) we can't. b) we know the hash of the
// key we're looking for.
val
:=
record
.
GetValue
()
log
.
Debug
(
"DHT got a value from other peer
.
"
)
log
.
Debug
(
"DHT got a value from other peer"
)
pk
,
err
=
ci
.
UnmarshalPublicKey
(
val
)
if
err
!=
nil
{
...
...
routing/dht/routing.go
浏览文件 @
0f3ae073
...
...
@@ -46,7 +46,7 @@ func (dht *IpfsDHT) PutValue(ctx context.Context, key key.Key, value []byte) err
rec
,
err
:=
record
.
MakePutRecord
(
sk
,
key
,
value
,
sign
)
if
err
!=
nil
{
log
.
Debug
(
"
C
reation of record failed!"
)
log
.
Debug
(
"
c
reation of record failed!"
)
return
err
}
...
...
@@ -346,7 +346,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
select
{
case
peerOut
<-
prov
:
case
<-
ctx
.
Done
()
:
log
.
Debug
(
"
C
ontext timed out sending more providers"
)
log
.
Debug
(
"
c
ontext timed out sending more providers"
)
return
nil
,
ctx
.
Err
()
}
}
...
...
@@ -397,7 +397,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
// Sanity...
for
_
,
p
:=
range
peers
{
if
p
==
id
{
log
.
Debug
(
"
F
ound target peer in list of closest peers..."
)
log
.
Debug
(
"
f
ound target peer in list of closest peers..."
)
return
dht
.
peerstore
.
PeerInfo
(
p
),
nil
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论