{"action":"created","comment":{"url":"https://api.github.com/repos/ros2/rclcpp/pulls/comments/151275175","pull_request_review_id":76957607,"id":151275175,"diff_hunk":"@@ -0,0 +1,101 @@\n+// generated from rclcpp/resource/logging.hpp.em\n+\n+// Copyright 2017 Open Source Robotics Foundation, Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#ifndef RCLCPP__LOGGING_HPP_\n+#define RCLCPP__LOGGING_HPP_\n+\n+#include \"rcutils/logging_macros.h\"\n+\n+// These are used for compiling out logging macros lower than a minimum severity.\n+#define RCLCPP_LOG_MIN_SEVERITY_DEBUG 0\n+#define RCLCPP_LOG_MIN_SEVERITY_INFO 1\n+#define RCLCPP_LOG_MIN_SEVERITY_WARN 2\n+#define RCLCPP_LOG_MIN_SEVERITY_ERROR 3\n+#define RCLCPP_LOG_MIN_SEVERITY_FATAL 4\n+#define RCLCPP_LOG_MIN_SEVERITY_NONE 5","path":"rclcpp/resource/logging.hpp.em","position":28,"original_position":28,"commit_id":"2ab45620ce0675d5c0860029177c4a8d53879587","original_commit_id":"2ab45620ce0675d5c0860029177c4a8d53879587","user":{"login":"mikaelarguedas","id":6644208,"avatar_url":"https://avatars1.githubusercontent.com/u/6644208?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaelarguedas","html_url":"https://github.com/mikaelarguedas","followers_url":"https://api.github.com/users/mikaelarguedas/followers","following_url":"https://api.github.com/users/mikaelarguedas/following{/other_user}","gists_url":"https://api.github.com/users/mikaelarguedas/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelarguedas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelarguedas/subscriptions","organizations_url":"https://api.github.com/users/mikaelarguedas/orgs","repos_url":"https://api.github.com/users/mikaelarguedas/repos","events_url":"https://api.github.com/users/mikaelarguedas/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelarguedas/received_events","type":"User","site_admin":false},"body":"I understood the purpose, the fact that we define different enums values for them still puzzles me though (and yeah I indeed missed  ros2/rcutils#60 which introduce the same \"error\" at the rcutils level IMO).\r\nIf a user want to add a custom severity, (let's say between debug and info for example), he can do it thanks to the values of rcutils:\r\n`RCUTILS_LOG_SEVERITY_VERBOSE_MYSEVERITY = 15`.\r\n but cannot compile only those out because these enums don't leave any room between the levels. But now he cannot just compile out by using the same level he defined in rcutils, he has to find something between `RCLCPP_LOG_MIN_SEVERITY_DEBUG` and `RCLCPP_LOG_MIN_SEVERITY_INFO`.\r\nHow do we expect users to do this ? by defining:\r\n```c\r\n#define RCLCPP_LOG_MIN_SEVERITY_MYSEVERITY RCUTILS_LOG_SEVERITY_MYSEVERITY/10\r\n```\r\nor with hardcoded floating point values ?\r\n```c\r\n#define RCLCPP_LOG_MIN_SEVERITY_MYSEVERITY 1.5\r\n```\r\nIt seems more user friendly to allow them to use the same values rather than a different one at each level, but maybe there is a technical constraint I missed here","created_at":"2017-11-15T22:47:37Z","updated_at":"2017-11-15T22:47:37Z","html_url":"https://github.com/ros2/rclcpp/pull/389#discussion_r151275175","pull_request_url":"https://api.github.com/repos/ros2/rclcpp/pulls/389","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/comments/151275175"},"html":{"href":"https://github.com/ros2/rclcpp/pull/389#discussion_r151275175"},"pull_request":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/389"}},"in_reply_to_id":151270886},"pull_request":{"url":"https://api.github.com/repos/ros2/rclcpp/pulls/389","id":148501477,"html_url":"https://github.com/ros2/rclcpp/pull/389","diff_url":"https://github.com/ros2/rclcpp/pull/389.diff","patch_url":"https://github.com/ros2/rclcpp/pull/389.patch","issue_url":"https://api.github.com/repos/ros2/rclcpp/issues/389","number":389,"state":"closed","locked":false,"title":"Implement rclcpp-specific logging macros [taking name not object]","user":{"login":"dhood","id":5618076,"avatar_url":"https://avatars0.githubusercontent.com/u/5618076?v=4","gravatar_id":"","url":"https://api.github.com/users/dhood","html_url":"https://github.com/dhood","followers_url":"https://api.github.com/users/dhood/followers","following_url":"https://api.github.com/users/dhood/following{/other_user}","gists_url":"https://api.github.com/users/dhood/gists{/gist_id}","starred_url":"https://api.github.com/users/dhood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhood/subscriptions","organizations_url":"https://api.github.com/users/dhood/orgs","repos_url":"https://api.github.com/users/dhood/repos","events_url":"https://api.github.com/users/dhood/events{/privacy}","received_events_url":"https://api.github.com/users/dhood/received_events","type":"User","site_admin":false},"body":"~Requires ros2/ament_cmake_ros#2~\r\n\r\nThese are wrappers around rcutils' logging macros (see details below) ~that inject the package name as the default name/prefix name, based on the decision in https://github.com/ros2/demos/pull/184~","created_at":"2017-10-24T20:15:06Z","updated_at":"2017-11-15T22:47:37Z","closed_at":"2017-11-15T22:14:09Z","merged_at":"2017-11-15T22:14:09Z","merge_commit_sha":"24f39700c666044aa9cb5dc47dccaf2ae2d93e2e","assignee":{"login":"dhood","id":5618076,"avatar_url":"https://avatars0.githubusercontent.com/u/5618076?v=4","gravatar_id":"","url":"https://api.github.com/users/dhood","html_url":"https://github.com/dhood","followers_url":"https://api.github.com/users/dhood/followers","following_url":"https://api.github.com/users/dhood/following{/other_user}","gists_url":"https://api.github.com/users/dhood/gists{/gist_id}","starred_url":"https://api.github.com/users/dhood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhood/subscriptions","organizations_url":"https://api.github.com/users/dhood/orgs","repos_url":"https://api.github.com/users/dhood/repos","events_url":"https://api.github.com/users/dhood/events{/privacy}","received_events_url":"https://api.github.com/users/dhood/received_events","type":"User","site_admin":false},"assignees":[{"login":"dhood","id":5618076,"avatar_url":"https://avatars0.githubusercontent.com/u/5618076?v=4","gravatar_id":"","url":"https://api.github.com/users/dhood","html_url":"https://github.com/dhood","followers_url":"https://api.github.com/users/dhood/followers","following_url":"https://api.github.com/users/dhood/following{/other_user}","gists_url":"https://api.github.com/users/dhood/gists{/gist_id}","starred_url":"https://api.github.com/users/dhood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhood/subscriptions","organizations_url":"https://api.github.com/users/dhood/orgs","repos_url":"https://api.github.com/users/dhood/repos","events_url":"https://api.github.com/users/dhood/events{/privacy}","received_events_url":"https://api.github.com/users/dhood/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ros2/rclcpp/pulls/389/commits","review_comments_url":"https://api.github.com/repos/ros2/rclcpp/pulls/389/comments","review_comment_url":"https://api.github.com/repos/ros2/rclcpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros2/rclcpp/issues/389/comments","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/2ab45620ce0675d5c0860029177c4a8d53879587","head":{"label":"ros2:logging_macros","ref":"logging_macros","sha":"2ab45620ce0675d5c0860029177c4a8d53879587","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":22737333,"name":"rclcpp","full_name":"ros2/rclcpp","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/rclcpp","description":"rclcpp (ROS Client Library for C++)","fork":false,"url":"https://api.github.com/repos/ros2/rclcpp","forks_url":"https://api.github.com/repos/ros2/rclcpp/forks","keys_url":"https://api.github.com/repos/ros2/rclcpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rclcpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rclcpp/teams","hooks_url":"https://api.github.com/repos/ros2/rclcpp/hooks","issue_events_url":"https://api.github.com/repos/ros2/rclcpp/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rclcpp/events","assignees_url":"https://api.github.com/repos/ros2/rclcpp/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rclcpp/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rclcpp/tags","blobs_url":"https://api.github.com/repos/ros2/rclcpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rclcpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rclcpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rclcpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rclcpp/languages","stargazers_url":"https://api.github.com/repos/ros2/rclcpp/stargazers","contributors_url":"https://api.github.com/repos/ros2/rclcpp/contributors","subscribers_url":"https://api.github.com/repos/ros2/rclcpp/subscribers","subscription_url":"https://api.github.com/repos/ros2/rclcpp/subscription","commits_url":"https://api.github.com/repos/ros2/rclcpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rclcpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rclcpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rclcpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rclcpp/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rclcpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rclcpp/merges","archive_url":"https://api.github.com/repos/ros2/rclcpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rclcpp/downloads","issues_url":"https://api.github.com/repos/ros2/rclcpp/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rclcpp/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rclcpp/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rclcpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rclcpp/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rclcpp/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rclcpp/deployments","created_at":"2014-08-07T21:36:38Z","updated_at":"2017-11-07T12:44:06Z","pushed_at":"2017-11-15T22:14:13Z","git_url":"git://github.com/ros2/rclcpp.git","ssh_url":"git@github.com:ros2/rclcpp.git","clone_url":"https://github.com/ros2/rclcpp.git","svn_url":"https://github.com/ros2/rclcpp","homepage":"","size":1101,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":52,"forks":24,"open_issues":52,"watchers":23,"default_branch":"master"}},"base":{"label":"ros2:master","ref":"master","sha":"989084b3de84000a15fb4bd5a7d63929001cd769","user":{"login":"ros2","id":3979232,"avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"repo":{"id":22737333,"name":"rclcpp","full_name":"ros2/rclcpp","owner":{"login":"ros2","id":3979232,"avatar_url":"https://avatars1.githubusercontent.com/u/3979232?v=4","gravatar_id":"","url":"https://api.github.com/users/ros2","html_url":"https://github.com/ros2","followers_url":"https://api.github.com/users/ros2/followers","following_url":"https://api.github.com/users/ros2/following{/other_user}","gists_url":"https://api.github.com/users/ros2/gists{/gist_id}","starred_url":"https://api.github.com/users/ros2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros2/subscriptions","organizations_url":"https://api.github.com/users/ros2/orgs","repos_url":"https://api.github.com/users/ros2/repos","events_url":"https://api.github.com/users/ros2/events{/privacy}","received_events_url":"https://api.github.com/users/ros2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros2/rclcpp","description":"rclcpp (ROS Client Library for C++)","fork":false,"url":"https://api.github.com/repos/ros2/rclcpp","forks_url":"https://api.github.com/repos/ros2/rclcpp/forks","keys_url":"https://api.github.com/repos/ros2/rclcpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros2/rclcpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros2/rclcpp/teams","hooks_url":"https://api.github.com/repos/ros2/rclcpp/hooks","issue_events_url":"https://api.github.com/repos/ros2/rclcpp/issues/events{/number}","events_url":"https://api.github.com/repos/ros2/rclcpp/events","assignees_url":"https://api.github.com/repos/ros2/rclcpp/assignees{/user}","branches_url":"https://api.github.com/repos/ros2/rclcpp/branches{/branch}","tags_url":"https://api.github.com/repos/ros2/rclcpp/tags","blobs_url":"https://api.github.com/repos/ros2/rclcpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros2/rclcpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros2/rclcpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros2/rclcpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros2/rclcpp/statuses/{sha}","languages_url":"https://api.github.com/repos/ros2/rclcpp/languages","stargazers_url":"https://api.github.com/repos/ros2/rclcpp/stargazers","contributors_url":"https://api.github.com/repos/ros2/rclcpp/contributors","subscribers_url":"https://api.github.com/repos/ros2/rclcpp/subscribers","subscription_url":"https://api.github.com/repos/ros2/rclcpp/subscription","commits_url":"https://api.github.com/repos/ros2/rclcpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros2/rclcpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros2/rclcpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros2/rclcpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros2/rclcpp/contents/{+path}","compare_url":"https://api.github.com/repos/ros2/rclcpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros2/rclcpp/merges","archive_url":"https://api.github.com/repos/ros2/rclcpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros2/rclcpp/downloads","issues_url":"https://api.github.com/repos/ros2/rclcpp/issues{/number}","pulls_url":"https://api.github.com/repos/ros2/rclcpp/pulls{/number}","milestones_url":"https://api.github.com/repos/ros2/rclcpp/milestones{/number}","notifications_url":"https://api.github.com/repos/ros2/rclcpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros2/rclcpp/labels{/name}","releases_url":"https://api.github.com/repos/ros2/rclcpp/releases{/id}","deployments_url":"https://api.github.com/repos/ros2/rclcpp/deployments","created_at":"2014-08-07T21:36:38Z","updated_at":"2017-11-07T12:44:06Z","pushed_at":"2017-11-15T22:14:13Z","git_url":"git://github.com/ros2/rclcpp.git","ssh_url":"git@github.com:ros2/rclcpp.git","clone_url":"https://github.com/ros2/rclcpp.git","svn_url":"https://github.com/ros2/rclcpp","homepage":"","size":1101,"stargazers_count":23,"watchers_count":23,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":52,"forks":24,"open_issues":52,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/389"},"html":{"href":"https://github.com/ros2/rclcpp/pull/389"},"issue":{"href":"https://api.github.com/repos/ros2/rclcpp/issues/389"},"comments":{"href":"https://api.github.com/repos/ros2/rclcpp/issues/389/comments"},"review_comments":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/389/comments"},"review_comment":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros2/rclcpp/pulls/389/commits"},"statuses":{"href":"https://api.github.com/repos/ros2/rclcpp/statuses/2ab45620ce0675d5c0860029177c4a8d53879587"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mikaelarguedas"}}