{"action":"created","comment":{"url":"https://api.github.com/repos/apache/mynewt-core/pulls/comments/197310195","pull_request_review_id":131032167,"id":197310195,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzMxMDE5NQ==","diff_hunk":"@@ -360,11 +360,15 @@ log_append_typed(struct log *log, uint8_t module, uint8_t level, uint8_t etype,\n }\n \n int\n-log_append_mbuf_typed(struct log *log, uint8_t module, uint8_t level,\n-                      uint8_t etype, struct os_mbuf *om)\n+log_append_mbuf_typed_no_free(struct log *log, uint8_t module, uint8_t level,\n+                              uint8_t etype, struct os_mbuf **om_ptr)\n {\n+    struct os_mbuf *om;\n     int rc;\n \n+    /* Remove a loyer of indirection for convenience. */","path":"sys/log/full/src/log.c","position":45,"original_position":45,"commit_id":"30c3859f1b2d7b8ad51e05aa092b464db4a52b30","original_commit_id":"30c3859f1b2d7b8ad51e05aa092b464db4a52b30","user":{"login":"vrahane","id":7097467,"node_id":"MDQ6VXNlcjcwOTc0Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/7097467?v=4","gravatar_id":"","url":"https://api.github.com/users/vrahane","html_url":"https://github.com/vrahane","followers_url":"https://api.github.com/users/vrahane/followers","following_url":"https://api.github.com/users/vrahane/following{/other_user}","gists_url":"https://api.github.com/users/vrahane/gists{/gist_id}","starred_url":"https://api.github.com/users/vrahane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrahane/subscriptions","organizations_url":"https://api.github.com/users/vrahane/orgs","repos_url":"https://api.github.com/users/vrahane/repos","events_url":"https://api.github.com/users/vrahane/events{/privacy}","received_events_url":"https://api.github.com/users/vrahane/received_events","type":"User","site_admin":false},"body":"not really that important but `loyer` should be `layer` :-)","created_at":"2018-06-22T00:03:37Z","updated_at":"2018-06-22T00:03:37Z","html_url":"https://github.com/apache/mynewt-core/pull/1174#discussion_r197310195","pull_request_url":"https://api.github.com/repos/apache/mynewt-core/pulls/1174","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/comments/197310195"},"html":{"href":"https://github.com/apache/mynewt-core/pull/1174#discussion_r197310195"},"pull_request":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/1174"}}},"pull_request":{"url":"https://api.github.com/repos/apache/mynewt-core/pulls/1174","id":193470282,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNDcwMjgy","html_url":"https://github.com/apache/mynewt-core/pull/1174","diff_url":"https://github.com/apache/mynewt-core/pull/1174.diff","patch_url":"https://github.com/apache/mynewt-core/pull/1174.patch","issue_url":"https://api.github.com/repos/apache/mynewt-core/issues/1174","number":1174,"state":"open","locked":false,"title":"log/modlog - Module-mapped logging","user":{"login":"ccollins476ad","id":13006531,"node_id":"MDQ6VXNlcjEzMDA2NTMx","avatar_url":"https://avatars0.githubusercontent.com/u/13006531?v=4","gravatar_id":"","url":"https://api.github.com/users/ccollins476ad","html_url":"https://github.com/ccollins476ad","followers_url":"https://api.github.com/users/ccollins476ad/followers","following_url":"https://api.github.com/users/ccollins476ad/following{/other_user}","gists_url":"https://api.github.com/users/ccollins476ad/gists{/gist_id}","starred_url":"https://api.github.com/users/ccollins476ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccollins476ad/subscriptions","organizations_url":"https://api.github.com/users/ccollins476ad/orgs","repos_url":"https://api.github.com/users/ccollins476ad/repos","events_url":"https://api.github.com/users/ccollins476ad/events{/privacy}","received_events_url":"https://api.github.com/users/ccollins476ad/received_events","type":"User","site_admin":false},"body":"The modlog facility allows log entries to be written to numeric modules identifiers.  In typical usage, startup code maps 8-bit module IDs to one or more log objects, and other parts of the application log events by writing entries to module IDs.  This usage differs from the underlying `sys/log` facility, which requires clients to provide a log object to write to rather than just a module identifier.\r\n\r\nBenefits provided by the modlog package are:\r\n* Improved modularity - configuration and usage are distinct.\r\n* Ability to write to several logs with a single function call.  If one module ID is mapped to several logs, a write to that ID causes all mapped logs to be written.\r\n* Default mappings.  Writes to unmapped module IDs get written to an optional set of default logs.\r\n* Minimum log level per mapping.  Writes specifying a log level less than the module's minimum level are discarded.\r\n* Decreased RAM usage; multiple unrelated packages can share the same `struct log` object rather than defining their own (`sizeof (struct log)` is 20).\r\n\r\n\r\nCosts of using modlog rather than the bare `sys/log` facility are:\r\n* Increased RAM usage (`MODLOG_MAX_MAPPINGS` * 12).\r\n* Increased CPU usage - each log write requires a lookup in the set of configured modlog mappings.\r\n\r\nExample usage:\r\n\r\n```\r\n    /* Map module 100 to the console log. */\r\n    rc = modlog_register(100, log_console_get(), LOG_LEVEL_DEBUG, NULL);\r\n    assert(rc == 0);\r\n\r\n    /* Log a message to module 100. */\r\n    MODLOG_INFO(100, \"hello from module %d\\n\", 100);\r\n```\r\n","created_at":"2018-06-07T23:03:31Z","updated_at":"2018-06-22T00:03:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60c1ef2c34c9388eee41f5033d2aa6e107acbfa6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/mynewt-core/pulls/1174/commits","review_comments_url":"https://api.github.com/repos/apache/mynewt-core/pulls/1174/comments","review_comment_url":"https://api.github.com/repos/apache/mynewt-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/mynewt-core/issues/1174/comments","statuses_url":"https://api.github.com/repos/apache/mynewt-core/statuses/30c3859f1b2d7b8ad51e05aa092b464db4a52b30","head":{"label":"ccollins476ad:log_mm","ref":"log_mm","sha":"30c3859f1b2d7b8ad51e05aa092b464db4a52b30","user":{"login":"ccollins476ad","id":13006531,"node_id":"MDQ6VXNlcjEzMDA2NTMx","avatar_url":"https://avatars0.githubusercontent.com/u/13006531?v=4","gravatar_id":"","url":"https://api.github.com/users/ccollins476ad","html_url":"https://github.com/ccollins476ad","followers_url":"https://api.github.com/users/ccollins476ad/followers","following_url":"https://api.github.com/users/ccollins476ad/following{/other_user}","gists_url":"https://api.github.com/users/ccollins476ad/gists{/gist_id}","starred_url":"https://api.github.com/users/ccollins476ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccollins476ad/subscriptions","organizations_url":"https://api.github.com/users/ccollins476ad/orgs","repos_url":"https://api.github.com/users/ccollins476ad/repos","events_url":"https://api.github.com/users/ccollins476ad/events{/privacy}","received_events_url":"https://api.github.com/users/ccollins476ad/received_events","type":"User","site_admin":false},"repo":{"id":54583308,"node_id":"MDEwOlJlcG9zaXRvcnk1NDU4MzMwOA==","name":"mynewt-core","full_name":"ccollins476ad/mynewt-core","owner":{"login":"ccollins476ad","id":13006531,"node_id":"MDQ6VXNlcjEzMDA2NTMx","avatar_url":"https://avatars0.githubusercontent.com/u/13006531?v=4","gravatar_id":"","url":"https://api.github.com/users/ccollins476ad","html_url":"https://github.com/ccollins476ad","followers_url":"https://api.github.com/users/ccollins476ad/followers","following_url":"https://api.github.com/users/ccollins476ad/following{/other_user}","gists_url":"https://api.github.com/users/ccollins476ad/gists{/gist_id}","starred_url":"https://api.github.com/users/ccollins476ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccollins476ad/subscriptions","organizations_url":"https://api.github.com/users/ccollins476ad/orgs","repos_url":"https://api.github.com/users/ccollins476ad/repos","events_url":"https://api.github.com/users/ccollins476ad/events{/privacy}","received_events_url":"https://api.github.com/users/ccollins476ad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ccollins476ad/mynewt-core","description":"Mirror of Apache MyNewt Core (Incubating)","fork":true,"url":"https://api.github.com/repos/ccollins476ad/mynewt-core","forks_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/forks","keys_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/teams","hooks_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/events","assignees_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/tags","blobs_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/languages","stargazers_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/subscription","commits_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/merges","archive_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/downloads","issues_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/ccollins476ad/mynewt-core/deployments","created_at":"2016-03-23T18:22:29Z","updated_at":"2017-07-06T23:27:18Z","pushed_at":"2018-06-20T21:50:18Z","git_url":"git://github.com/ccollins476ad/mynewt-core.git","ssh_url":"git@github.com:ccollins476ad/mynewt-core.git","clone_url":"https://github.com/ccollins476ad/mynewt-core.git","svn_url":"https://github.com/ccollins476ad/mynewt-core","homepage":"","size":154816,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"89e89035263dab1ab649147452c3cc3fce486383","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":45165993,"node_id":"MDEwOlJlcG9zaXRvcnk0NTE2NTk5Mw==","name":"mynewt-core","full_name":"apache/mynewt-core","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/mynewt-core","description":"An OS to build, deploy and securely manage billions of devices","fork":false,"url":"https://api.github.com/repos/apache/mynewt-core","forks_url":"https://api.github.com/repos/apache/mynewt-core/forks","keys_url":"https://api.github.com/repos/apache/mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/mynewt-core/teams","hooks_url":"https://api.github.com/repos/apache/mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/apache/mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/apache/mynewt-core/events","assignees_url":"https://api.github.com/repos/apache/mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/apache/mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/apache/mynewt-core/tags","blobs_url":"https://api.github.com/repos/apache/mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/mynewt-core/languages","stargazers_url":"https://api.github.com/repos/apache/mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/apache/mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/apache/mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/apache/mynewt-core/subscription","commits_url":"https://api.github.com/repos/apache/mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/apache/mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/mynewt-core/merges","archive_url":"https://api.github.com/repos/apache/mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/mynewt-core/downloads","issues_url":"https://api.github.com/repos/apache/mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/apache/mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/apache/mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/apache/mynewt-core/deployments","created_at":"2015-10-29T07:00:07Z","updated_at":"2018-06-21T23:46:27Z","pushed_at":"2018-06-21T23:46:22Z","git_url":"git://github.com/apache/mynewt-core.git","ssh_url":"git@github.com:apache/mynewt-core.git","clone_url":"https://github.com/apache/mynewt-core.git","svn_url":"https://github.com/apache/mynewt-core","homepage":"https://mynewt.apache.org/","size":154132,"stargazers_count":352,"watchers_count":352,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":179,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":179,"open_issues":46,"watchers":352,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/1174"},"html":{"href":"https://github.com/apache/mynewt-core/pull/1174"},"issue":{"href":"https://api.github.com/repos/apache/mynewt-core/issues/1174"},"comments":{"href":"https://api.github.com/repos/apache/mynewt-core/issues/1174/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/1174/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/mynewt-core/pulls/1174/commits"},"statuses":{"href":"https://api.github.com/repos/apache/mynewt-core/statuses/30c3859f1b2d7b8ad51e05aa092b464db4a52b30"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vrahane"}}