{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/39818366","id":39818366,"diff_hunk":"@@ -0,0 +1,69 @@\n+/*\n+Copyright 2015 The Kubernetes Authors All rights reserved.\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+\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\t\"strings\"\n+\n+\t\"github.com/golang/glog\"\n+\t\"github.com/ziutek/syslog\"\n+)\n+\n+type handler struct {\n+\t*syslog.BaseHandler\n+}\n+\n+type syslogServer struct {\n+\t*syslog.Server\n+}\n+\n+// NewSyslogServer start a syslog server using a unix socket to listen for connections","path":"service-loadbalancer/loadbalancer_log.go","position":36,"original_position":36,"commit_id":"c3e3ed4aaf0f80e1f296e0fdd2a5a8ed36d94b9a","original_commit_id":"c3e3ed4aaf0f80e1f296e0fdd2a5a8ed36d94b9a","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"body":"Please lower case New to match the function name","created_at":"2015-09-18T01:52:49Z","updated_at":"2015-09-18T01:52:49Z","html_url":"https://github.com/kubernetes/contrib/pull/93#discussion_r39818366","pull_request_url":"https://api.github.com/repos/kubernetes/contrib/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/39818366"},"html":{"href":"https://github.com/kubernetes/contrib/pull/93#discussion_r39818366"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/93","id":45247643,"html_url":"https://github.com/kubernetes/contrib/pull/93","diff_url":"https://github.com/kubernetes/contrib/pull/93.diff","patch_url":"https://github.com/kubernetes/contrib/pull/93.patch","issue_url":"https://api.github.com/repos/kubernetes/contrib/issues/93","number":93,"state":"open","locked":false,"title":"Add syslog server to servicelb image to get haproxy logs","user":{"login":"aledbf","id":161571,"avatar_url":"https://avatars.githubusercontent.com/u/161571?v=3","gravatar_id":"","url":"https://api.github.com/users/aledbf","html_url":"https://github.com/aledbf","followers_url":"https://api.github.com/users/aledbf/followers","following_url":"https://api.github.com/users/aledbf/following{/other_user}","gists_url":"https://api.github.com/users/aledbf/gists{/gist_id}","starred_url":"https://api.github.com/users/aledbf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledbf/subscriptions","organizations_url":"https://api.github.com/users/aledbf/orgs","repos_url":"https://api.github.com/users/aledbf/repos","events_url":"https://api.github.com/users/aledbf/events{/privacy}","received_events_url":"https://api.github.com/users/aledbf/received_events","type":"User","site_admin":false},"body":"Is not possible to use a file or device like `/dev/log`, but is possible to use a syslog server.\r\nThis allows the redirection of `haproxy` logs to stdout starting a local syslog server that just prints the content of the messages\r\n```\r\nSep 15 17:45:57 backend-4 sh[25987]: servicelb [INFO] 172.17.144.1:58858 [15/Sep/2015:17:45:54.182] www app-demo/172.17.144.3:5000 3557/0/0/2/3559 200 139 - - ---- 2/2/0/1/0 0/0 \"HEAD /v3/health-check HTTP/1.1\"\r\n```","created_at":"2015-09-17T03:07:50Z","updated_at":"2015-09-18T01:52:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebf78d99849df97eed3b5a27203a02a5a7b9d3a0","assignee":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/contrib/pulls/93/commits","review_comments_url":"https://api.github.com/repos/kubernetes/contrib/pulls/93/comments","review_comment_url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/contrib/issues/93/comments","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/c3e3ed4aaf0f80e1f296e0fdd2a5a8ed36d94b9a","head":{"label":"aledbf:log-to-stdout","ref":"log-to-stdout","sha":"c3e3ed4aaf0f80e1f296e0fdd2a5a8ed36d94b9a","user":{"login":"aledbf","id":161571,"avatar_url":"https://avatars.githubusercontent.com/u/161571?v=3","gravatar_id":"","url":"https://api.github.com/users/aledbf","html_url":"https://github.com/aledbf","followers_url":"https://api.github.com/users/aledbf/followers","following_url":"https://api.github.com/users/aledbf/following{/other_user}","gists_url":"https://api.github.com/users/aledbf/gists{/gist_id}","starred_url":"https://api.github.com/users/aledbf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledbf/subscriptions","organizations_url":"https://api.github.com/users/aledbf/orgs","repos_url":"https://api.github.com/users/aledbf/repos","events_url":"https://api.github.com/users/aledbf/events{/privacy}","received_events_url":"https://api.github.com/users/aledbf/received_events","type":"User","site_admin":false},"repo":{"id":42607552,"name":"contrib","full_name":"aledbf/contrib","owner":{"login":"aledbf","id":161571,"avatar_url":"https://avatars.githubusercontent.com/u/161571?v=3","gravatar_id":"","url":"https://api.github.com/users/aledbf","html_url":"https://github.com/aledbf","followers_url":"https://api.github.com/users/aledbf/followers","following_url":"https://api.github.com/users/aledbf/following{/other_user}","gists_url":"https://api.github.com/users/aledbf/gists{/gist_id}","starred_url":"https://api.github.com/users/aledbf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledbf/subscriptions","organizations_url":"https://api.github.com/users/aledbf/orgs","repos_url":"https://api.github.com/users/aledbf/repos","events_url":"https://api.github.com/users/aledbf/events{/privacy}","received_events_url":"https://api.github.com/users/aledbf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aledbf/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":true,"url":"https://api.github.com/repos/aledbf/contrib","forks_url":"https://api.github.com/repos/aledbf/contrib/forks","keys_url":"https://api.github.com/repos/aledbf/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aledbf/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aledbf/contrib/teams","hooks_url":"https://api.github.com/repos/aledbf/contrib/hooks","issue_events_url":"https://api.github.com/repos/aledbf/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/aledbf/contrib/events","assignees_url":"https://api.github.com/repos/aledbf/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/aledbf/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/aledbf/contrib/tags","blobs_url":"https://api.github.com/repos/aledbf/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aledbf/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aledbf/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/aledbf/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aledbf/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/aledbf/contrib/languages","stargazers_url":"https://api.github.com/repos/aledbf/contrib/stargazers","contributors_url":"https://api.github.com/repos/aledbf/contrib/contributors","subscribers_url":"https://api.github.com/repos/aledbf/contrib/subscribers","subscription_url":"https://api.github.com/repos/aledbf/contrib/subscription","commits_url":"https://api.github.com/repos/aledbf/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/aledbf/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/aledbf/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/aledbf/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/aledbf/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/aledbf/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aledbf/contrib/merges","archive_url":"https://api.github.com/repos/aledbf/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aledbf/contrib/downloads","issues_url":"https://api.github.com/repos/aledbf/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/aledbf/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/aledbf/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/aledbf/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aledbf/contrib/labels{/name}","releases_url":"https://api.github.com/repos/aledbf/contrib/releases{/id}","created_at":"2015-09-16T19:04:49Z","updated_at":"2015-09-16T19:04:50Z","pushed_at":"2015-09-18T01:07:54Z","git_url":"git://github.com/aledbf/contrib.git","ssh_url":"git@github.com:aledbf/contrib.git","clone_url":"https://github.com/aledbf/contrib.git","svn_url":"https://github.com/aledbf/contrib","homepage":"","size":5354,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"kubernetes:master","ref":"master","sha":"590008dc84576d2cd375a1f2eced38dee4467acc","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":40686014,"name":"contrib","full_name":"kubernetes/contrib","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":false,"url":"https://api.github.com/repos/kubernetes/contrib","forks_url":"https://api.github.com/repos/kubernetes/contrib/forks","keys_url":"https://api.github.com/repos/kubernetes/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/contrib/teams","hooks_url":"https://api.github.com/repos/kubernetes/contrib/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/contrib/events","assignees_url":"https://api.github.com/repos/kubernetes/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/contrib/tags","blobs_url":"https://api.github.com/repos/kubernetes/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/contrib/languages","stargazers_url":"https://api.github.com/repos/kubernetes/contrib/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/contrib/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/contrib/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/contrib/subscription","commits_url":"https://api.github.com/repos/kubernetes/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/contrib/merges","archive_url":"https://api.github.com/repos/kubernetes/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/contrib/downloads","issues_url":"https://api.github.com/repos/kubernetes/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/contrib/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/contrib/releases{/id}","created_at":"2015-08-13T23:18:26Z","updated_at":"2015-09-16T19:04:46Z","pushed_at":"2015-09-18T01:07:55Z","git_url":"git://github.com/kubernetes/contrib.git","ssh_url":"git@github.com:kubernetes/contrib.git","clone_url":"https://github.com/kubernetes/contrib.git","svn_url":"https://github.com/kubernetes/contrib","homepage":"","size":6452,"stargazers_count":28,"watchers_count":28,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":19,"forks":39,"open_issues":19,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/93"},"html":{"href":"https://github.com/kubernetes/contrib/pull/93"},"issue":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/93"},"comments":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/contrib/statuses/c3e3ed4aaf0f80e1f296e0fdd2a5a8ed36d94b9a"}}}}