{"action":"created","comment":{"url":"https://api.github.com/repos/line/armeria/pulls/comments/257113951","pull_request_review_id":204090475,"id":257113951,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1NzExMzk1MQ==","diff_hunk":"@@ -573,6 +573,11 @@ public String requestContentPreview() {\n         return requestContentPreview;\n     }\n \n+    @Override\n+    public void requestContentPreview(@Nullable String requestContentPreview) {\n+        this.requestContentPreview = requestContentPreview;","path":"core/src/main/java/com/linecorp/armeria/common/logging/DefaultRequestLog.java","position":123,"original_position":33,"commit_id":"674ad949596a0d51d6446b59a0ed6f06651946cf","original_commit_id":"674ad949596a0d51d6446b59a0ed6f06651946cf","user":{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"body":"- `requireNonNull`\r\n- Should not allow setting after reaching `REQUEST_CONTENT` availability, because otherwise the preview becomes mutable.\r\n","created_at":"2019-02-15T06:09:17Z","updated_at":"2019-02-15T06:10:38Z","html_url":"https://github.com/line/armeria/pull/1574#discussion_r257113951","pull_request_url":"https://api.github.com/repos/line/armeria/pulls/1574","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/comments/257113951"},"html":{"href":"https://github.com/line/armeria/pull/1574#discussion_r257113951"},"pull_request":{"href":"https://api.github.com/repos/line/armeria/pulls/1574"}}},"pull_request":{"url":"https://api.github.com/repos/line/armeria/pulls/1574","id":251037489,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUxMDM3NDg5","html_url":"https://github.com/line/armeria/pull/1574","diff_url":"https://github.com/line/armeria/pull/1574.diff","patch_url":"https://github.com/line/armeria/pull/1574.patch","issue_url":"https://api.github.com/repos/line/armeria/issues/1574","number":1574,"state":"open","locked":false,"title":"Support content preview for request/response in RequestLog","user":{"login":"tmdgus0118","id":10107502,"node_id":"MDQ6VXNlcjEwMTA3NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/10107502?v=4","gravatar_id":"","url":"https://api.github.com/users/tmdgus0118","html_url":"https://github.com/tmdgus0118","followers_url":"https://api.github.com/users/tmdgus0118/followers","following_url":"https://api.github.com/users/tmdgus0118/following{/other_user}","gists_url":"https://api.github.com/users/tmdgus0118/gists{/gist_id}","starred_url":"https://api.github.com/users/tmdgus0118/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmdgus0118/subscriptions","organizations_url":"https://api.github.com/users/tmdgus0118/orgs","repos_url":"https://api.github.com/users/tmdgus0118/repos","events_url":"https://api.github.com/users/tmdgus0118/events{/privacy}","received_events_url":"https://api.github.com/users/tmdgus0118/received_events","type":"User","site_admin":false},"body":"Motivation:\r\nrelated to #730 \r\n- Currently, there's no way to log content using supported LoggingDecorators unless you use `RequestLogBuilder.deferRequestContent()` or `RequestLogBuilder.deferResponseContent()` which may not be good for a user who does not want to log all of content body.\r\n\r\nModification:\r\n- Added an `ContentPreviewer` interface.\r\n- Added a package-private `ByteAggreagtedPreviewer` class which implements `ContentPreviewer` for reproducing preview a user may want. A user can create this via `ContentPreviewer.ofBinary()`\r\n- Added a package-private `StringAggregatedPreviewer` class which implements `ContentPreviewer` for collecting string with the specified max length and the charset based on `content-type` header (or defaultCharset). A user can create this via `ContentPreviewer.ofText()`\r\n- Added an `ContentPreviewerFactory` interface which creates a new previewer for the request/responses with specific content-type or on the condition specified by a user.\r\n\r\nTODO:\r\n- Add java docs and documents.\r\n\r\n\r\n","created_at":"2019-02-07T09:09:27Z","updated_at":"2019-02-15T06:10:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"991f8bdadf567ca176b11d7a9f767b2990aebdd9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"hyangtack","id":8417787,"node_id":"MDQ6VXNlcjg0MTc3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/8417787?v=4","gravatar_id":"","url":"https://api.github.com/users/hyangtack","html_url":"https://github.com/hyangtack","followers_url":"https://api.github.com/users/hyangtack/followers","following_url":"https://api.github.com/users/hyangtack/following{/other_user}","gists_url":"https://api.github.com/users/hyangtack/gists{/gist_id}","starred_url":"https://api.github.com/users/hyangtack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyangtack/subscriptions","organizations_url":"https://api.github.com/users/hyangtack/orgs","repos_url":"https://api.github.com/users/hyangtack/repos","events_url":"https://api.github.com/users/hyangtack/events{/privacy}","received_events_url":"https://api.github.com/users/hyangtack/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":287373881,"node_id":"MDU6TGFiZWwyODczNzM4ODE=","url":"https://api.github.com/repos/line/armeria/labels/new-feature","name":"new-feature","color":"009800","default":false}],"milestone":{"url":"https://api.github.com/repos/line/armeria/milestones/130","html_url":"https://github.com/line/armeria/milestone/130","labels_url":"https://api.github.com/repos/line/armeria/milestones/130/labels","id":3992251,"node_id":"MDk6TWlsZXN0b25lMzk5MjI1MQ==","number":130,"title":"0.80.0","description":"","creator":{"login":"minwoox","id":25103250,"node_id":"MDQ6VXNlcjI1MTAzMjUw","avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":35,"state":"open","created_at":"2019-01-22T09:50:25Z","updated_at":"2019-02-15T04:12:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/line/armeria/pulls/1574/commits","review_comments_url":"https://api.github.com/repos/line/armeria/pulls/1574/comments","review_comment_url":"https://api.github.com/repos/line/armeria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/line/armeria/issues/1574/comments","statuses_url":"https://api.github.com/repos/line/armeria/statuses/674ad949596a0d51d6446b59a0ed6f06651946cf","head":{"label":"tmdgus0118:PR730_NEW","ref":"PR730_NEW","sha":"674ad949596a0d51d6446b59a0ed6f06651946cf","user":{"login":"tmdgus0118","id":10107502,"node_id":"MDQ6VXNlcjEwMTA3NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/10107502?v=4","gravatar_id":"","url":"https://api.github.com/users/tmdgus0118","html_url":"https://github.com/tmdgus0118","followers_url":"https://api.github.com/users/tmdgus0118/followers","following_url":"https://api.github.com/users/tmdgus0118/following{/other_user}","gists_url":"https://api.github.com/users/tmdgus0118/gists{/gist_id}","starred_url":"https://api.github.com/users/tmdgus0118/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmdgus0118/subscriptions","organizations_url":"https://api.github.com/users/tmdgus0118/orgs","repos_url":"https://api.github.com/users/tmdgus0118/repos","events_url":"https://api.github.com/users/tmdgus0118/events{/privacy}","received_events_url":"https://api.github.com/users/tmdgus0118/received_events","type":"User","site_admin":false},"repo":{"id":163805641,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM4MDU2NDE=","name":"armeria","full_name":"tmdgus0118/armeria","private":false,"owner":{"login":"tmdgus0118","id":10107502,"node_id":"MDQ6VXNlcjEwMTA3NTAy","avatar_url":"https://avatars3.githubusercontent.com/u/10107502?v=4","gravatar_id":"","url":"https://api.github.com/users/tmdgus0118","html_url":"https://github.com/tmdgus0118","followers_url":"https://api.github.com/users/tmdgus0118/followers","following_url":"https://api.github.com/users/tmdgus0118/following{/other_user}","gists_url":"https://api.github.com/users/tmdgus0118/gists{/gist_id}","starred_url":"https://api.github.com/users/tmdgus0118/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmdgus0118/subscriptions","organizations_url":"https://api.github.com/users/tmdgus0118/orgs","repos_url":"https://api.github.com/users/tmdgus0118/repos","events_url":"https://api.github.com/users/tmdgus0118/events{/privacy}","received_events_url":"https://api.github.com/users/tmdgus0118/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tmdgus0118/armeria","description":"Asynchronous RPC/REST library built on top of Java 8, Netty, HTTP/2, Thrift and gRPC","fork":true,"url":"https://api.github.com/repos/tmdgus0118/armeria","forks_url":"https://api.github.com/repos/tmdgus0118/armeria/forks","keys_url":"https://api.github.com/repos/tmdgus0118/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmdgus0118/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmdgus0118/armeria/teams","hooks_url":"https://api.github.com/repos/tmdgus0118/armeria/hooks","issue_events_url":"https://api.github.com/repos/tmdgus0118/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/tmdgus0118/armeria/events","assignees_url":"https://api.github.com/repos/tmdgus0118/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/tmdgus0118/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/tmdgus0118/armeria/tags","blobs_url":"https://api.github.com/repos/tmdgus0118/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmdgus0118/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmdgus0118/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmdgus0118/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmdgus0118/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/tmdgus0118/armeria/languages","stargazers_url":"https://api.github.com/repos/tmdgus0118/armeria/stargazers","contributors_url":"https://api.github.com/repos/tmdgus0118/armeria/contributors","subscribers_url":"https://api.github.com/repos/tmdgus0118/armeria/subscribers","subscription_url":"https://api.github.com/repos/tmdgus0118/armeria/subscription","commits_url":"https://api.github.com/repos/tmdgus0118/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmdgus0118/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmdgus0118/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmdgus0118/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmdgus0118/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/tmdgus0118/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmdgus0118/armeria/merges","archive_url":"https://api.github.com/repos/tmdgus0118/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmdgus0118/armeria/downloads","issues_url":"https://api.github.com/repos/tmdgus0118/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/tmdgus0118/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/tmdgus0118/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/tmdgus0118/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmdgus0118/armeria/labels{/name}","releases_url":"https://api.github.com/repos/tmdgus0118/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/tmdgus0118/armeria/deployments","created_at":"2019-01-02T06:57:32Z","updated_at":"2019-01-17T02:53:17Z","pushed_at":"2019-02-15T05:49:23Z","git_url":"git://github.com/tmdgus0118/armeria.git","ssh_url":"git@github.com:tmdgus0118/armeria.git","clone_url":"https://github.com/tmdgus0118/armeria.git","svn_url":"https://github.com/tmdgus0118/armeria","homepage":"https://line.github.io/armeria/","size":58991,"stargazers_count":0,"watchers_count":0,"language":"Java","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":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"line:master","ref":"master","sha":"ff461582d285950f105d512a520381fa06b63159","user":{"login":"line","id":13128444,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTI4NDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"repo":{"id":46251204,"node_id":"MDEwOlJlcG9zaXRvcnk0NjI1MTIwNA==","name":"armeria","full_name":"line/armeria","private":false,"owner":{"login":"line","id":13128444,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTI4NDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/line/armeria","description":"Asynchronous RPC/REST library built on top of Java 8, Netty, HTTP/2, Thrift and gRPC","fork":false,"url":"https://api.github.com/repos/line/armeria","forks_url":"https://api.github.com/repos/line/armeria/forks","keys_url":"https://api.github.com/repos/line/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/line/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/line/armeria/teams","hooks_url":"https://api.github.com/repos/line/armeria/hooks","issue_events_url":"https://api.github.com/repos/line/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/line/armeria/events","assignees_url":"https://api.github.com/repos/line/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/line/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/line/armeria/tags","blobs_url":"https://api.github.com/repos/line/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/line/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/line/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/line/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/line/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/line/armeria/languages","stargazers_url":"https://api.github.com/repos/line/armeria/stargazers","contributors_url":"https://api.github.com/repos/line/armeria/contributors","subscribers_url":"https://api.github.com/repos/line/armeria/subscribers","subscription_url":"https://api.github.com/repos/line/armeria/subscription","commits_url":"https://api.github.com/repos/line/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/line/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/line/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/line/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/line/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/line/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/line/armeria/merges","archive_url":"https://api.github.com/repos/line/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/line/armeria/downloads","issues_url":"https://api.github.com/repos/line/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/line/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/line/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/line/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/line/armeria/labels{/name}","releases_url":"https://api.github.com/repos/line/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/line/armeria/deployments","created_at":"2015-11-16T04:04:01Z","updated_at":"2019-02-15T03:19:47Z","pushed_at":"2019-02-15T06:04:07Z","git_url":"git://github.com/line/armeria.git","ssh_url":"git@github.com:line/armeria.git","clone_url":"https://github.com/line/armeria.git","svn_url":"https://github.com/line/armeria","homepage":"https://line.github.io/armeria/","size":63859,"stargazers_count":1612,"watchers_count":1612,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":340,"mirror_url":null,"archived":false,"open_issues_count":111,"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":340,"open_issues":111,"watchers":1612,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/1574"},"html":{"href":"https://github.com/line/armeria/pull/1574"},"issue":{"href":"https://api.github.com/repos/line/armeria/issues/1574"},"comments":{"href":"https://api.github.com/repos/line/armeria/issues/1574/comments"},"review_comments":{"href":"https://api.github.com/repos/line/armeria/pulls/1574/comments"},"review_comment":{"href":"https://api.github.com/repos/line/armeria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/line/armeria/pulls/1574/commits"},"statuses":{"href":"https://api.github.com/repos/line/armeria/statuses/674ad949596a0d51d6446b59a0ed6f06651946cf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"trustin"}}