{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/comments/56063118","id":56063118,"diff_hunk":"@@ -110,7 +110,21 @@ extern \"C\" {\n #define tr_cmdline(...)         mbed_tracef(TRACE_LEVEL_CMD,     TRACE_GROUP, __VA_ARGS__)   //!< Special print for cmdline. See more from TRACE_LEVEL_CMD -level\n \n /** Possible to skip all traces in compile time */\n-#if defined(YOTTA_CFG_MBED_TRACE)\n+#if defined(YOTTA_CFG_MBED_TRACE) || (defined(YOTTA_CFG) && !defined(NDEBUG))\n+\n+/**\n+ * Allow specification of default TRACE_GROUP to be used if not specified by application\n+ */\n+\n+#ifndef TRACE_GROUP\n+#ifdef YOTTA_CFG_MBED_TRACE_GROUP\n+#define STR_HELPER(x) #x\n+#define STR(x) STR_HELPER(x)","path":"mbed-trace/mbed_trace.h","position":14,"original_position":14,"commit_id":"8e7a4778443c99dd56501e9b595c833c6be80b29","original_commit_id":"8e7a4778443c99dd56501e9b595c833c6be80b29","user":{"login":"SeppoTakalo","id":3104794,"avatar_url":"https://avatars.githubusercontent.com/u/3104794?v=3","gravatar_id":"","url":"https://api.github.com/users/SeppoTakalo","html_url":"https://github.com/SeppoTakalo","followers_url":"https://api.github.com/users/SeppoTakalo/followers","following_url":"https://api.github.com/users/SeppoTakalo/following{/other_user}","gists_url":"https://api.github.com/users/SeppoTakalo/gists{/gist_id}","starred_url":"https://api.github.com/users/SeppoTakalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeppoTakalo/subscriptions","organizations_url":"https://api.github.com/users/SeppoTakalo/orgs","repos_url":"https://api.github.com/users/SeppoTakalo/repos","events_url":"https://api.github.com/users/SeppoTakalo/events{/privacy}","received_events_url":"https://api.github.com/users/SeppoTakalo/received_events","type":"User","site_admin":false},"body":"Yes, I agree.\r\nThis is public header file, so you are polluting public namespace with macros `STR` and `STR_HELPER` which are too generic, I think.\r\n\r\nRefactor those to be `TRACE_GROUP_STR` and `TRACE_GROUP_STR_HELPER`","created_at":"2016-03-14T19:45:06Z","updated_at":"2016-03-14T19:45:06Z","html_url":"https://github.com/ARMmbed/mbed-trace/pull/5#discussion_r56063118","pull_request_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/comments/56063118"},"html":{"href":"https://github.com/ARMmbed/mbed-trace/pull/5#discussion_r56063118"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5","id":62510120,"html_url":"https://github.com/ARMmbed/mbed-trace/pull/5","diff_url":"https://github.com/ARMmbed/mbed-trace/pull/5.diff","patch_url":"https://github.com/ARMmbed/mbed-trace/pull/5.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/5","number":5,"state":"open","locked":false,"title":"Trace group","user":{"login":"teetak01","id":15607794,"avatar_url":"https://avatars.githubusercontent.com/u/15607794?v=3","gravatar_id":"","url":"https://api.github.com/users/teetak01","html_url":"https://github.com/teetak01","followers_url":"https://api.github.com/users/teetak01/followers","following_url":"https://api.github.com/users/teetak01/following{/other_user}","gists_url":"https://api.github.com/users/teetak01/gists{/gist_id}","starred_url":"https://api.github.com/users/teetak01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teetak01/subscriptions","organizations_url":"https://api.github.com/users/teetak01/orgs","repos_url":"https://api.github.com/users/teetak01/repos","events_url":"https://api.github.com/users/teetak01/events{/privacy}","received_events_url":"https://api.github.com/users/teetak01/received_events","type":"User","site_admin":false},"body":"@jupe @kuggenhoffen @anttiylitokola \r\n\r\nCould you check this? This now allows specification of a TRACE_GROUP name from config.json. It also now has default TRACE_GROUP \"APPL\" in case TRACE_GROUP is not defined anywhere.\r\n\r\nFor. example\r\n\r\n{\r\n    \"mbed-trace\": 1,\r\n    \"mbed-trace-group\": \"mbed-client\"\r\n}\r\n\r\nAlso added the NDEBUG flag to checks. Otherwise compiling with '-d' flag does not enable traces.\r\n\r\nThe HAVE_DEBUG flag mentioned in mbed Client m2mconfig.h is obsolete and does not seem to do anything. That if statement is purely decided by NDEBUG flag.","created_at":"2016-03-11T08:12:55Z","updated_at":"2016-03-14T19:45:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19e7b48f72c3c85be62975ff8f66e900cfdb002a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/5/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-trace/statuses/8e7a4778443c99dd56501e9b595c833c6be80b29","head":{"label":"ARMmbed:trace_group","ref":"trace_group","sha":"8e7a4778443c99dd56501e9b595c833c6be80b29","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":53117365,"name":"mbed-trace","full_name":"ARMmbed/mbed-trace","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbed-trace","description":"mbed trace library","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-trace","forks_url":"https://api.github.com/repos/ARMmbed/mbed-trace/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-trace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-trace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-trace/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-trace/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-trace/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-trace/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-trace/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-trace/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-trace/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-trace/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-trace/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-trace/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-trace/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-trace/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-trace/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-trace/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-trace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-trace/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-trace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-trace/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-trace/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-trace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-trace/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-trace/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/deployments","created_at":"2016-03-04T07:44:35Z","updated_at":"2016-03-04T09:18:19Z","pushed_at":"2016-03-14T17:43:01Z","git_url":"git://github.com/ARMmbed/mbed-trace.git","ssh_url":"git@github.com:ARMmbed/mbed-trace.git","clone_url":"https://github.com/ARMmbed/mbed-trace.git","svn_url":"https://github.com/ARMmbed/mbed-trace","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:master","ref":"master","sha":"ef9c041e04f2ff03bd0e158a5ed91b10bed22921","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":53117365,"name":"mbed-trace","full_name":"ARMmbed/mbed-trace","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbed-trace","description":"mbed trace library","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-trace","forks_url":"https://api.github.com/repos/ARMmbed/mbed-trace/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-trace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-trace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-trace/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-trace/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-trace/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-trace/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-trace/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-trace/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-trace/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-trace/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-trace/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-trace/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-trace/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-trace/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-trace/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-trace/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-trace/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-trace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-trace/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-trace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-trace/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-trace/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-trace/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-trace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-trace/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-trace/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-trace/deployments","created_at":"2016-03-04T07:44:35Z","updated_at":"2016-03-04T09:18:19Z","pushed_at":"2016-03-14T17:43:01Z","git_url":"git://github.com/ARMmbed/mbed-trace.git","ssh_url":"git@github.com:ARMmbed/mbed-trace.git","clone_url":"https://github.com/ARMmbed/mbed-trace.git","svn_url":"https://github.com/ARMmbed/mbed-trace","homepage":null,"size":53,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5"},"html":{"href":"https://github.com/ARMmbed/mbed-trace/pull/5"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/5"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-trace/statuses/8e7a4778443c99dd56501e9b595c833c6be80b29"}}}}