Skip to content

Commit

Permalink
Merge pull request #390 from jbenet/misc/2014-11-0X
Browse files Browse the repository at this point in the history
hotfix(logging) fix interpretation of peer ID in Loggable output
  • Loading branch information
Brian Tiger Chow committed Nov 28, 2014
2 parents bad4db3 + 52631c6 commit ff23d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
config "github.com/jbenet/go-ipfs/config"
core "github.com/jbenet/go-ipfs/core"
daemon "github.com/jbenet/go-ipfs/core/daemon"
repo "github.com/jbenet/go-ipfs/repo"
updates "github.com/jbenet/go-ipfs/updates"
u "github.com/jbenet/go-ipfs/util"
"github.com/jbenet/go-ipfs/util/debugerror"
eventlog "github.com/jbenet/go-ipfs/util/eventlog"
repo "github.com/jbenet/go-ipfs/repo"
)

// log is the command logger
Expand Down Expand Up @@ -295,6 +295,7 @@ func callCommand(ctx context.Context, req cmds.Request, root *cmds.Command) (cmd
return nil, err
}

log.Info("looking for running daemon...")
useDaemon, err := commandShouldRunOnDaemon(*details, req, root)
if err != nil {
return nil, err
Expand Down Expand Up @@ -383,7 +384,6 @@ func commandShouldRunOnDaemon(details cmdDetails, req cmds.Request, root *cmds.C
return false, nil
}

log.Info("looking for running daemon...")
// at this point need to know whether daemon is running. we defer
// to this point so that some commands dont open files unnecessarily.
daemonLocked := daemon.Locked(req.Context().ConfigRoot)
Expand Down
2 changes: 1 addition & 1 deletion peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (p *peer) String() string {
func (p *peer) Loggable() map[string]interface{} {
return map[string]interface{}{
p.GetType().String(): map[string]interface{}{
"id": p.ID(),
"id": p.ID().String(),
"latency": p.GetLatency(),
},
}
Expand Down

0 comments on commit ff23d2d

Please sign in to comment.