andrzej-kaczmarek commented on issue #995: sys/log: Updates to handle CBOR 
entries via nmgr
URL: https://github.com/apache/mynewt-core/pull/995#issuecomment-380155382
 
 
   Yes, the data over newtmgr can be binary but actually I had log entries that 
are sent in response over newtmgr in mind - sorry for confusion. In this case, 
each log entry included in response has 'msg' parameter which is the log 
message and it is always encoded to CBOR response as string by log_nmgr.c 
(which was a fair assumption given that only string entries were logged). Now, 
I'd like this 'msg' to be binary data which I don't think is possible without 
extra encoding in general, but since the response itself is CBOR data, the log 
entry of type CBOR can be just appended there. In JSON notation (kind of) 
instead of
   `{ 'msg' : 'text log entry }`
   it would be:
   `{ 'msg' : { 'foo' : 1, 'bar' : 'test' } }`
   where `{ 'foo' : 1, 'bar' : 'test' }` is contents of log entry. I believe 
`newtmgr` does not understand such response since it seems to be stuck trying 
to receive it so it would need to check extra 'type' parameter and act 
accordingly. Nothing changes for string logs - they are handled exactly as 
previously.
   
   HTH :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to