{"action":"created","comment":{"url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/comments/59859602","id":59859602,"diff_hunk":"@@ -14,13 +14,14 @@ case class AccessLogger(log: Logger) extends SimpleFilter[Request, Response] {\n     val user = \"-\"\n     val referer = reqHeaders.getOrElse(\"Referer\", \"-\")\n     val userAgent = reqHeaders.getOrElse(\"User-Agent\", \"-\")\n+    var hostHeader = reqHeaders.getOrElse(\"Host\", \"-\")\n     val reqResource = s\"${req.method.toString.toUpperCase} ${req.uri} ${req.version}\"\n \n     svc(req).onSuccess { rsp =>\n       val statusCode = rsp.statusCode\n       val responseBytes = rsp.contentLength.map(_.toString).getOrElse(\"-\")\n       val requestEndTime = new TimeFormat(\"dd/MM/yyyy:HH:mm:ss Z\").format(Time.now)\n-      log.info(s\"\"\"$remoteHost $identd $user [$requestEndTime] \"$reqResource\" $statusCode $responseBytes \"$referer\" \"$userAgent\"\"\"\")","path":"linkerd/protocol/http/src/main/scala/io/buoyant/linkerd/protocol/http/AccessLogger.scala","position":11,"original_position":11,"commit_id":"3700e8941e565d4956bbecd23197a6353761e0e5","original_commit_id":"3700e8941e565d4956bbecd23197a6353761e0e5","user":{"login":"angrylogic","id":4575020,"avatar_url":"https://avatars.githubusercontent.com/u/4575020?v=3","gravatar_id":"","url":"https://api.github.com/users/angrylogic","html_url":"https://github.com/angrylogic","followers_url":"https://api.github.com/users/angrylogic/followers","following_url":"https://api.github.com/users/angrylogic/following{/other_user}","gists_url":"https://api.github.com/users/angrylogic/gists{/gist_id}","starred_url":"https://api.github.com/users/angrylogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angrylogic/subscriptions","organizations_url":"https://api.github.com/users/angrylogic/orgs","repos_url":"https://api.github.com/users/angrylogic/repos","events_url":"https://api.github.com/users/angrylogic/events{/privacy}","received_events_url":"https://api.github.com/users/angrylogic/received_events","type":"User","site_admin":false},"body":"FWIW this patch follows a suggested convention from the apache httpd: https://httpd.apache.org/docs/2.4/logs.html#virtualhost\r\n\r\nThere are existing tools like split-logfile which should be able to parse this format:\r\nhttps://httpd.apache.org/docs/2.4/programs/split-logfile.html","created_at":"2016-04-15T11:12:17Z","updated_at":"2016-04-15T11:12:17Z","html_url":"https://github.com/BuoyantIO/linkerd/pull/290#discussion_r59859602","pull_request_url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/comments/59859602"},"html":{"href":"https://github.com/BuoyantIO/linkerd/pull/290#discussion_r59859602"},"pull_request":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290","id":66567227,"html_url":"https://github.com/BuoyantIO/linkerd/pull/290","diff_url":"https://github.com/BuoyantIO/linkerd/pull/290.diff","patch_url":"https://github.com/BuoyantIO/linkerd/pull/290.patch","issue_url":"https://api.github.com/repos/BuoyantIO/linkerd/issues/290","number":290,"state":"open","locked":false,"title":"Add the http Host header to access logs","user":{"login":"benley","id":1432730,"avatar_url":"https://avatars.githubusercontent.com/u/1432730?v=3","gravatar_id":"","url":"https://api.github.com/users/benley","html_url":"https://github.com/benley","followers_url":"https://api.github.com/users/benley/followers","following_url":"https://api.github.com/users/benley/following{/other_user}","gists_url":"https://api.github.com/users/benley/gists{/gist_id}","starred_url":"https://api.github.com/users/benley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benley/subscriptions","organizations_url":"https://api.github.com/users/benley/orgs","repos_url":"https://api.github.com/users/benley/repos","events_url":"https://api.github.com/users/benley/events{/privacy}","received_events_url":"https://api.github.com/users/benley/received_events","type":"User","site_admin":false},"body":"This helps with interpreting logs when routing to backend services by hostname.","created_at":"2016-04-14T22:56:47Z","updated_at":"2016-04-15T11:12:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5bb39534e5d05643ad992e0d817796a9421587c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290/commits","review_comments_url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290/comments","review_comment_url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BuoyantIO/linkerd/issues/290/comments","statuses_url":"https://api.github.com/repos/BuoyantIO/linkerd/statuses/3700e8941e565d4956bbecd23197a6353761e0e5","head":{"label":"benley:master","ref":"master","sha":"3700e8941e565d4956bbecd23197a6353761e0e5","user":{"login":"benley","id":1432730,"avatar_url":"https://avatars.githubusercontent.com/u/1432730?v=3","gravatar_id":"","url":"https://api.github.com/users/benley","html_url":"https://github.com/benley","followers_url":"https://api.github.com/users/benley/followers","following_url":"https://api.github.com/users/benley/following{/other_user}","gists_url":"https://api.github.com/users/benley/gists{/gist_id}","starred_url":"https://api.github.com/users/benley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benley/subscriptions","organizations_url":"https://api.github.com/users/benley/orgs","repos_url":"https://api.github.com/users/benley/repos","events_url":"https://api.github.com/users/benley/events{/privacy}","received_events_url":"https://api.github.com/users/benley/received_events","type":"User","site_admin":false},"repo":{"id":56274991,"name":"linkerd","full_name":"benley/linkerd","owner":{"login":"benley","id":1432730,"avatar_url":"https://avatars.githubusercontent.com/u/1432730?v=3","gravatar_id":"","url":"https://api.github.com/users/benley","html_url":"https://github.com/benley","followers_url":"https://api.github.com/users/benley/followers","following_url":"https://api.github.com/users/benley/following{/other_user}","gists_url":"https://api.github.com/users/benley/gists{/gist_id}","starred_url":"https://api.github.com/users/benley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benley/subscriptions","organizations_url":"https://api.github.com/users/benley/orgs","repos_url":"https://api.github.com/users/benley/repos","events_url":"https://api.github.com/users/benley/events{/privacy}","received_events_url":"https://api.github.com/users/benley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benley/linkerd","description":"A dynamic linker for microservices.","fork":true,"url":"https://api.github.com/repos/benley/linkerd","forks_url":"https://api.github.com/repos/benley/linkerd/forks","keys_url":"https://api.github.com/repos/benley/linkerd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benley/linkerd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benley/linkerd/teams","hooks_url":"https://api.github.com/repos/benley/linkerd/hooks","issue_events_url":"https://api.github.com/repos/benley/linkerd/issues/events{/number}","events_url":"https://api.github.com/repos/benley/linkerd/events","assignees_url":"https://api.github.com/repos/benley/linkerd/assignees{/user}","branches_url":"https://api.github.com/repos/benley/linkerd/branches{/branch}","tags_url":"https://api.github.com/repos/benley/linkerd/tags","blobs_url":"https://api.github.com/repos/benley/linkerd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benley/linkerd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benley/linkerd/git/refs{/sha}","trees_url":"https://api.github.com/repos/benley/linkerd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benley/linkerd/statuses/{sha}","languages_url":"https://api.github.com/repos/benley/linkerd/languages","stargazers_url":"https://api.github.com/repos/benley/linkerd/stargazers","contributors_url":"https://api.github.com/repos/benley/linkerd/contributors","subscribers_url":"https://api.github.com/repos/benley/linkerd/subscribers","subscription_url":"https://api.github.com/repos/benley/linkerd/subscription","commits_url":"https://api.github.com/repos/benley/linkerd/commits{/sha}","git_commits_url":"https://api.github.com/repos/benley/linkerd/git/commits{/sha}","comments_url":"https://api.github.com/repos/benley/linkerd/comments{/number}","issue_comment_url":"https://api.github.com/repos/benley/linkerd/issues/comments{/number}","contents_url":"https://api.github.com/repos/benley/linkerd/contents/{+path}","compare_url":"https://api.github.com/repos/benley/linkerd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benley/linkerd/merges","archive_url":"https://api.github.com/repos/benley/linkerd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benley/linkerd/downloads","issues_url":"https://api.github.com/repos/benley/linkerd/issues{/number}","pulls_url":"https://api.github.com/repos/benley/linkerd/pulls{/number}","milestones_url":"https://api.github.com/repos/benley/linkerd/milestones{/number}","notifications_url":"https://api.github.com/repos/benley/linkerd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benley/linkerd/labels{/name}","releases_url":"https://api.github.com/repos/benley/linkerd/releases{/id}","deployments_url":"https://api.github.com/repos/benley/linkerd/deployments","created_at":"2016-04-14T22:55:18Z","updated_at":"2016-04-14T22:55:19Z","pushed_at":"2016-04-14T22:55:50Z","git_url":"git://github.com/benley/linkerd.git","ssh_url":"git@github.com:benley/linkerd.git","clone_url":"https://github.com/benley/linkerd.git","svn_url":"https://github.com/benley/linkerd","homepage":"https://linkerd.io","size":1086,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BuoyantIO:master","ref":"master","sha":"c968d5f6f0377813b60c09647245ce753c579a0f","user":{"login":"BuoyantIO","id":10824329,"avatar_url":"https://avatars.githubusercontent.com/u/10824329?v=3","gravatar_id":"","url":"https://api.github.com/users/BuoyantIO","html_url":"https://github.com/BuoyantIO","followers_url":"https://api.github.com/users/BuoyantIO/followers","following_url":"https://api.github.com/users/BuoyantIO/following{/other_user}","gists_url":"https://api.github.com/users/BuoyantIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BuoyantIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuoyantIO/subscriptions","organizations_url":"https://api.github.com/users/BuoyantIO/orgs","repos_url":"https://api.github.com/users/BuoyantIO/repos","events_url":"https://api.github.com/users/BuoyantIO/events{/privacy}","received_events_url":"https://api.github.com/users/BuoyantIO/received_events","type":"Organization","site_admin":false},"repo":{"id":49605596,"name":"linkerd","full_name":"BuoyantIO/linkerd","owner":{"login":"BuoyantIO","id":10824329,"avatar_url":"https://avatars.githubusercontent.com/u/10824329?v=3","gravatar_id":"","url":"https://api.github.com/users/BuoyantIO","html_url":"https://github.com/BuoyantIO","followers_url":"https://api.github.com/users/BuoyantIO/followers","following_url":"https://api.github.com/users/BuoyantIO/following{/other_user}","gists_url":"https://api.github.com/users/BuoyantIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BuoyantIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuoyantIO/subscriptions","organizations_url":"https://api.github.com/users/BuoyantIO/orgs","repos_url":"https://api.github.com/users/BuoyantIO/repos","events_url":"https://api.github.com/users/BuoyantIO/events{/privacy}","received_events_url":"https://api.github.com/users/BuoyantIO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BuoyantIO/linkerd","description":"A dynamic linker for microservices.","fork":false,"url":"https://api.github.com/repos/BuoyantIO/linkerd","forks_url":"https://api.github.com/repos/BuoyantIO/linkerd/forks","keys_url":"https://api.github.com/repos/BuoyantIO/linkerd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BuoyantIO/linkerd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BuoyantIO/linkerd/teams","hooks_url":"https://api.github.com/repos/BuoyantIO/linkerd/hooks","issue_events_url":"https://api.github.com/repos/BuoyantIO/linkerd/issues/events{/number}","events_url":"https://api.github.com/repos/BuoyantIO/linkerd/events","assignees_url":"https://api.github.com/repos/BuoyantIO/linkerd/assignees{/user}","branches_url":"https://api.github.com/repos/BuoyantIO/linkerd/branches{/branch}","tags_url":"https://api.github.com/repos/BuoyantIO/linkerd/tags","blobs_url":"https://api.github.com/repos/BuoyantIO/linkerd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BuoyantIO/linkerd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BuoyantIO/linkerd/git/refs{/sha}","trees_url":"https://api.github.com/repos/BuoyantIO/linkerd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BuoyantIO/linkerd/statuses/{sha}","languages_url":"https://api.github.com/repos/BuoyantIO/linkerd/languages","stargazers_url":"https://api.github.com/repos/BuoyantIO/linkerd/stargazers","contributors_url":"https://api.github.com/repos/BuoyantIO/linkerd/contributors","subscribers_url":"https://api.github.com/repos/BuoyantIO/linkerd/subscribers","subscription_url":"https://api.github.com/repos/BuoyantIO/linkerd/subscription","commits_url":"https://api.github.com/repos/BuoyantIO/linkerd/commits{/sha}","git_commits_url":"https://api.github.com/repos/BuoyantIO/linkerd/git/commits{/sha}","comments_url":"https://api.github.com/repos/BuoyantIO/linkerd/comments{/number}","issue_comment_url":"https://api.github.com/repos/BuoyantIO/linkerd/issues/comments{/number}","contents_url":"https://api.github.com/repos/BuoyantIO/linkerd/contents/{+path}","compare_url":"https://api.github.com/repos/BuoyantIO/linkerd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BuoyantIO/linkerd/merges","archive_url":"https://api.github.com/repos/BuoyantIO/linkerd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BuoyantIO/linkerd/downloads","issues_url":"https://api.github.com/repos/BuoyantIO/linkerd/issues{/number}","pulls_url":"https://api.github.com/repos/BuoyantIO/linkerd/pulls{/number}","milestones_url":"https://api.github.com/repos/BuoyantIO/linkerd/milestones{/number}","notifications_url":"https://api.github.com/repos/BuoyantIO/linkerd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BuoyantIO/linkerd/labels{/name}","releases_url":"https://api.github.com/repos/BuoyantIO/linkerd/releases{/id}","deployments_url":"https://api.github.com/repos/BuoyantIO/linkerd/deployments","created_at":"2016-01-13T22:14:52Z","updated_at":"2016-04-14T01:25:13Z","pushed_at":"2016-04-14T23:25:59Z","git_url":"git://github.com/BuoyantIO/linkerd.git","ssh_url":"git@github.com:BuoyantIO/linkerd.git","clone_url":"https://github.com/BuoyantIO/linkerd.git","svn_url":"https://github.com/BuoyantIO/linkerd","homepage":"https://linkerd.io","size":1154,"stargazers_count":567,"watchers_count":567,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":49,"forks":27,"open_issues":49,"watchers":567,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290"},"html":{"href":"https://github.com/BuoyantIO/linkerd/pull/290"},"issue":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/issues/290"},"comments":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/BuoyantIO/linkerd/statuses/3700e8941e565d4956bbecd23197a6353761e0e5"}}}}