Remoted bytes from logging messages

This commit is contained in:
Jae Kwon
2015-04-20 18:51:20 -07:00
parent dc051eb87f
commit df026f64fa
3 changed files with 7 additions and 3 deletions

View File

@ -79,6 +79,10 @@ func main() {
if barak.rootDir == "" {
barak.rootDir = os.Getenv("HOME") + "/.barak"
}
err = EnsureDir(barak.rootDir)
if err != nil {
panic(Fmt("Error creating barak rootDir: %v", err))
}
// Write pid to file.
err = AtomicWriteFile(barak.rootDir+"/pidfile", []byte(Fmt("%v", barak.pid)))

View File

@ -136,7 +136,7 @@ func (conR *ConsensusReactor) Receive(chId byte, peer *p2p.Peer, msgBytes []byte
log.Warn("Error decoding message", "channel", chId, "peer", peer, "msg", msg_, "error", err, "bytes", msgBytes)
return
}
log.Debug("Receive", "channel", chId, "peer", peer, "msg", msg_, "bytes", msgBytes)
log.Debug("Receive", "channel", chId, "peer", peer, "msg", msg_) //, "bytes", msgBytes)
switch chId {
case StateChannel:
@ -295,7 +295,7 @@ func (conR *ConsensusReactor) sendNewRoundStepRoutine(peer *p2p.Peer) {
peer.Send(StateChannel, nrsMsg)
}
if csMsg != nil {
peer.Send(StateChannel, nrsMsg)
peer.Send(StateChannel, csMsg)
}
}

View File

@ -184,7 +184,7 @@ func (c *MConnection) Send(chId byte, msg interface{}) bool {
return false
}
log.Debug("Send", "channel", chId, "connection", c, "msg", msg, "bytes", binary.BinaryBytes(msg))
log.Debug("Send", "channel", chId, "connection", c, "msg", msg) //, "bytes", binary.BinaryBytes(msg))
// Send message to channel.
channel, ok := c.channelsIdx[chId]