You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/28 12:53:52 UTC

[GitHub] andrzej-kaczmarek commented on issue #933: sys/log: Better handling for long/non-text entries

andrzej-kaczmarek commented on issue #933: sys/log: Better handling for long/non-text entries
URL: https://github.com/apache/mynewt-core/pull/933#issuecomment-376875722
 
 
   Thanks for review, Chris!
   
   I made few modificatoins, here's short summary wrt your comments:
   1. I added `LOG_VERSION` which defaults to v2 so existing app won't break. If v3 is enabled, log entry type field is available and app can log typed messages other than string.
   I am reluctant to add version to log entry as this means we need to maintain code which can read different versions of entries. Log version compatibility applies only to FCB handler (or some custom ones if someone implemented in own app) and in FCB we already have version field which can be utilized to detect mismatched versions and act accordingly. For now I just added check to FCB code so it will fail when trying to init area with different version. But I am open for discussion here :-)
   2. I removed fallback to cbmem so this is now just a (very) thin wrapper over standard FCB - it uses the same log structure and will just return OS_EBUSY if slot 1 was locked. An open question here is when this slot should be locked - probably somewhere in imgmgr code or sth, I'm not familiar with that code at all.
   3. Added.
   4. Agree, but since I removed fallback to cbmem and this is just a wrapper over standard FCB this race does not occur anymore.
   5. Updated.
   
   I will upload modified version soon.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services