{"action":"created","comment":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/50138674","id":50138674,"diff_hunk":"@@ -42,6 +42,54 @@ extern \"C\" {\n     typedef struct kaa_log_collector        kaa_log_collector_t;\n #endif\n \n+/**\n+ * @brief Log bucket information structure.\n+ * One or more log records aggregated into the bucket.\n+ */\n+typedef struct\n+{\n+    uint16_t bucket_id;     /**< ID of bucket present in storage. */\n+    size_t   log_count;     /**< Logs left to upload across all buckets. */\n+} kaa_log_bucket_info_t;\n+\n+/**\n+ * @brief Log record info.\n+ *\n+ * Each log is contained in the bucket. Bucket is used to agreggate\n+ * multiple logs into one entity that will be atomically sent to the server.\n+ * Bucket can either be entirely successfully sent or be entirely failed.\n+ * Corresponding events are generated. User may subscribe to them.\n+ * @sa kaa_log_event_fn\n+ * @sa kaa_log_listeners_t\n+ * @sa kaa_logging_set_listeners\n+ */\n+typedef struct\n+{\n+    uint32_t log_id;    /**< Id of a log record processed by kaa_logging_add_record() */\n+    uint16_t bucket_id; /**< Id of a bucket where a log record contained */\n+} kaa_log_record_info_t;\n+\n+/**\n+ * @brief Event handler type.\n+ *\n+ * Bucket information can be used to retrieve a amount of logs that still\n+ *\n+ * @param[in,out]  ctx    User-definied context. @sa kaa_logging_add_record\n+ * @param[in]      bucket Log bucket for which event was triggered.\n+ */\n+typedef void (*kaa_log_event_fn)(void *ctx, const kaa_log_bucket_info_t *bucket);","path":"client/client-multi/client-c/src/kaa/kaa_logging.h","position":39,"original_position":39,"commit_id":"8e8645ebcccfb99e5a0db62a0cf336b8eeda4446","original_commit_id":"8e8645ebcccfb99e5a0db62a0cf336b8eeda4446","user":{"login":"dyosick","id":712449,"avatar_url":"https://avatars.githubusercontent.com/u/712449?v=3","gravatar_id":"","url":"https://api.github.com/users/dyosick","html_url":"https://github.com/dyosick","followers_url":"https://api.github.com/users/dyosick/followers","following_url":"https://api.github.com/users/dyosick/following{/other_user}","gists_url":"https://api.github.com/users/dyosick/gists{/gist_id}","starred_url":"https://api.github.com/users/dyosick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyosick/subscriptions","organizations_url":"https://api.github.com/users/dyosick/orgs","repos_url":"https://api.github.com/users/dyosick/repos","events_url":"https://api.github.com/users/dyosick/events{/privacy}","received_events_url":"https://api.github.com/users/dyosick/received_events","type":"User","site_admin":false},"body":"Use \"context\" instead of \"ctx\"","created_at":"2016-01-19T16:49:57Z","updated_at":"2016-01-19T16:49:57Z","html_url":"https://github.com/kaaproject/kaa/pull/441#discussion_r50138674","pull_request_url":"https://api.github.com/repos/kaaproject/kaa/pulls/441","_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/50138674"},"html":{"href":"https://github.com/kaaproject/kaa/pull/441#discussion_r50138674"},"pull_request":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/441"}}},"pull_request":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/441","id":56491194,"html_url":"https://github.com/kaaproject/kaa/pull/441","diff_url":"https://github.com/kaaproject/kaa/pull/441.diff","patch_url":"https://github.com/kaaproject/kaa/pull/441.patch","issue_url":"https://api.github.com/repos/kaaproject/kaa/issues/441","number":441,"state":"open","locked":false,"title":"Kaa 773 log delivery callbacks","user":{"login":"forGGe","id":5261821,"avatar_url":"https://avatars.githubusercontent.com/u/5261821?v=3","gravatar_id":"","url":"https://api.github.com/users/forGGe","html_url":"https://github.com/forGGe","followers_url":"https://api.github.com/users/forGGe/followers","following_url":"https://api.github.com/users/forGGe/following{/other_user}","gists_url":"https://api.github.com/users/forGGe/gists{/gist_id}","starred_url":"https://api.github.com/users/forGGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forGGe/subscriptions","organizations_url":"https://api.github.com/users/forGGe/orgs","repos_url":"https://api.github.com/users/forGGe/repos","events_url":"https://api.github.com/users/forGGe/events{/privacy}","received_events_url":"https://api.github.com/users/forGGe/received_events","type":"User","site_admin":false},"body":"Includes:\r\n - implementation\r\n - tests\r\n - small improvements to the test framework\r\n - couple of nitpicks","created_at":"2016-01-19T16:37:46Z","updated_at":"2016-01-19T16:49:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df9e48f7bab5126e726e9c695319bebb343d0d55","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kaaproject/kaa/pulls/441/commits","review_comments_url":"https://api.github.com/repos/kaaproject/kaa/pulls/441/comments","review_comment_url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaaproject/kaa/issues/441/comments","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/8e8645ebcccfb99e5a0db62a0cf336b8eeda4446","head":{"label":"forGGe:KAA-773_log_delivery_callbacks","ref":"KAA-773_log_delivery_callbacks","sha":"8e8645ebcccfb99e5a0db62a0cf336b8eeda4446","user":{"login":"forGGe","id":5261821,"avatar_url":"https://avatars.githubusercontent.com/u/5261821?v=3","gravatar_id":"","url":"https://api.github.com/users/forGGe","html_url":"https://github.com/forGGe","followers_url":"https://api.github.com/users/forGGe/followers","following_url":"https://api.github.com/users/forGGe/following{/other_user}","gists_url":"https://api.github.com/users/forGGe/gists{/gist_id}","starred_url":"https://api.github.com/users/forGGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forGGe/subscriptions","organizations_url":"https://api.github.com/users/forGGe/orgs","repos_url":"https://api.github.com/users/forGGe/repos","events_url":"https://api.github.com/users/forGGe/events{/privacy}","received_events_url":"https://api.github.com/users/forGGe/received_events","type":"User","site_admin":false},"repo":{"id":47995904,"name":"kaa","full_name":"forGGe/kaa","owner":{"login":"forGGe","id":5261821,"avatar_url":"https://avatars.githubusercontent.com/u/5261821?v=3","gravatar_id":"","url":"https://api.github.com/users/forGGe","html_url":"https://github.com/forGGe","followers_url":"https://api.github.com/users/forGGe/followers","following_url":"https://api.github.com/users/forGGe/following{/other_user}","gists_url":"https://api.github.com/users/forGGe/gists{/gist_id}","starred_url":"https://api.github.com/users/forGGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forGGe/subscriptions","organizations_url":"https://api.github.com/users/forGGe/orgs","repos_url":"https://api.github.com/users/forGGe/repos","events_url":"https://api.github.com/users/forGGe/events{/privacy}","received_events_url":"https://api.github.com/users/forGGe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/forGGe/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":true,"url":"https://api.github.com/repos/forGGe/kaa","forks_url":"https://api.github.com/repos/forGGe/kaa/forks","keys_url":"https://api.github.com/repos/forGGe/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forGGe/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forGGe/kaa/teams","hooks_url":"https://api.github.com/repos/forGGe/kaa/hooks","issue_events_url":"https://api.github.com/repos/forGGe/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/forGGe/kaa/events","assignees_url":"https://api.github.com/repos/forGGe/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/forGGe/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/forGGe/kaa/tags","blobs_url":"https://api.github.com/repos/forGGe/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forGGe/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forGGe/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/forGGe/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forGGe/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/forGGe/kaa/languages","stargazers_url":"https://api.github.com/repos/forGGe/kaa/stargazers","contributors_url":"https://api.github.com/repos/forGGe/kaa/contributors","subscribers_url":"https://api.github.com/repos/forGGe/kaa/subscribers","subscription_url":"https://api.github.com/repos/forGGe/kaa/subscription","commits_url":"https://api.github.com/repos/forGGe/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/forGGe/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/forGGe/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/forGGe/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/forGGe/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/forGGe/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forGGe/kaa/merges","archive_url":"https://api.github.com/repos/forGGe/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forGGe/kaa/downloads","issues_url":"https://api.github.com/repos/forGGe/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/forGGe/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/forGGe/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/forGGe/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forGGe/kaa/labels{/name}","releases_url":"https://api.github.com/repos/forGGe/kaa/releases{/id}","created_at":"2015-12-14T19:16:40Z","updated_at":"2015-12-14T19:16:48Z","pushed_at":"2016-01-19T16:34:07Z","git_url":"git://github.com/forGGe/kaa.git","ssh_url":"git@github.com:forGGe/kaa.git","clone_url":"https://github.com/forGGe/kaa.git","svn_url":"https://github.com/forGGe/kaa","homepage":"http://www.kaaproject.org","size":108888,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kaaproject:develop/v0.8.0","ref":"develop/v0.8.0","sha":"99539d6263a6da3bcd9a96eeb79243a541c7cbee","user":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":17839346,"name":"kaa","full_name":"kaaproject/kaa","owner":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaaproject/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":false,"url":"https://api.github.com/repos/kaaproject/kaa","forks_url":"https://api.github.com/repos/kaaproject/kaa/forks","keys_url":"https://api.github.com/repos/kaaproject/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaaproject/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaaproject/kaa/teams","hooks_url":"https://api.github.com/repos/kaaproject/kaa/hooks","issue_events_url":"https://api.github.com/repos/kaaproject/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/kaaproject/kaa/events","assignees_url":"https://api.github.com/repos/kaaproject/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/kaaproject/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/kaaproject/kaa/tags","blobs_url":"https://api.github.com/repos/kaaproject/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaaproject/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaaproject/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaaproject/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/kaaproject/kaa/languages","stargazers_url":"https://api.github.com/repos/kaaproject/kaa/stargazers","contributors_url":"https://api.github.com/repos/kaaproject/kaa/contributors","subscribers_url":"https://api.github.com/repos/kaaproject/kaa/subscribers","subscription_url":"https://api.github.com/repos/kaaproject/kaa/subscription","commits_url":"https://api.github.com/repos/kaaproject/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaaproject/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaaproject/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaaproject/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaaproject/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/kaaproject/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaaproject/kaa/merges","archive_url":"https://api.github.com/repos/kaaproject/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaaproject/kaa/downloads","issues_url":"https://api.github.com/repos/kaaproject/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/kaaproject/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/kaaproject/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/kaaproject/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaaproject/kaa/labels{/name}","releases_url":"https://api.github.com/repos/kaaproject/kaa/releases{/id}","created_at":"2014-03-17T18:48:31Z","updated_at":"2016-01-15T08:16:42Z","pushed_at":"2016-01-19T16:37:47Z","git_url":"git://github.com/kaaproject/kaa.git","ssh_url":"git@github.com:kaaproject/kaa.git","clone_url":"https://github.com/kaaproject/kaa.git","svn_url":"https://github.com/kaaproject/kaa","homepage":"http://www.kaaproject.org","size":113349,"stargazers_count":187,"watchers_count":187,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":7,"forks":44,"open_issues":7,"watchers":187,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/441"},"html":{"href":"https://github.com/kaaproject/kaa/pull/441"},"issue":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/441"},"comments":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/441/comments"},"review_comments":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/441/comments"},"review_comment":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/441/commits"},"statuses":{"href":"https://api.github.com/repos/kaaproject/kaa/statuses/8e8645ebcccfb99e5a0db62a0cf336b8eeda4446"}}}}