You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/04/06 08:24:04 UTC
incubator-mynewt-newt git commit: newtmgr: more logging(Fixing format
specifiers)
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/develop 08820b7dd -> b70ee821b
newtmgr: more logging(Fixing format specifiers)
This closes #6
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/b70ee821
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/b70ee821
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/b70ee821
Branch: refs/heads/develop
Commit: b70ee821be876fa1946b05e8e7cef9ebb822e9b0
Parents: 08820b7
Author: Vipul Rahane <vi...@runtime.io>
Authored: Tue Apr 5 20:39:19 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Apr 5 23:23:43 2016 -0700
----------------------------------------------------------------------
newtmgr/protocol/cmdrunner.go | 4 +++-
newtmgr/protocol/nmgr.go | 2 +-
newtmgr/transport/connserial.go | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b70ee821/newtmgr/protocol/cmdrunner.go
----------------------------------------------------------------------
diff --git a/newtmgr/protocol/cmdrunner.go b/newtmgr/protocol/cmdrunner.go
index 6ecc8ca..198a83a 100644
--- a/newtmgr/protocol/cmdrunner.go
+++ b/newtmgr/protocol/cmdrunner.go
@@ -39,6 +39,8 @@ func (cr *CmdRunner) ReadResp() (*NmgrReq, error) {
bytes := pkt.GetBytes()
bytes = bytes[8:]
+ log.Debugf("before deserializing:%s", string(bytes))
+
nmr, err := DeserializeNmgrReq(pkt.GetBytes())
if err != nil {
return nil, err
@@ -52,7 +54,7 @@ func (cr *CmdRunner) ReadResp() (*NmgrReq, error) {
func (cr *CmdRunner) WriteReq(nmr *NmgrReq) error {
data := []byte{}
- log.Debugf("Writing netmgr request %s", nmr)
+ log.Debugf("Writing netmgr request %+v", nmr)
data, err := nmr.SerializeRequest(data)
if err != nil {
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b70ee821/newtmgr/protocol/nmgr.go
----------------------------------------------------------------------
diff --git a/newtmgr/protocol/nmgr.go b/newtmgr/protocol/nmgr.go
index 8fadb46..4c60517 100644
--- a/newtmgr/protocol/nmgr.go
+++ b/newtmgr/protocol/nmgr.go
@@ -78,7 +78,6 @@ func DeserializeNmgrReq(data []byte) (*NmgrReq, error) {
}
func (nmr *NmgrReq) SerializeRequest(data []byte) ([]byte, error) {
- log.Debugf("Serializing request %s into buffer %s", nmr, data)
u16b := make([]byte, 2)
@@ -96,5 +95,6 @@ func (nmr *NmgrReq) SerializeRequest(data []byte) ([]byte, error) {
data = append(data, nmr.Data...)
+ log.Debugf("Serializing request %+v into buffer %+v", nmr, data)
return data, nil
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b70ee821/newtmgr/transport/connserial.go
----------------------------------------------------------------------
diff --git a/newtmgr/transport/connserial.go b/newtmgr/transport/connserial.go
index fe22fd2..5e90f80 100644
--- a/newtmgr/transport/connserial.go
+++ b/newtmgr/transport/connserial.go
@@ -116,7 +116,7 @@ func (cs *ConnSerial) ReadPacket() (*Packet, error) {
}
func (cs *ConnSerial) writeData(bytes []byte) {
- log.Debugf("Writing %b to data channel", bytes)
+ log.Debugf("Writing %+v to data channel", bytes)
cs.serialChannel.Write(bytes)
}