{"action":"opened","number":7,"pull_request":{"url":"https://api.github.com/repos/futuresimple/mantrid/pulls/7","id":30854175,"html_url":"https://github.com/futuresimple/mantrid/pull/7","diff_url":"https://github.com/futuresimple/mantrid/pull/7.diff","patch_url":"https://github.com/futuresimple/mantrid/pull/7.patch","issue_url":"https://api.github.com/repos/futuresimple/mantrid/issues/7","number":7,"state":"open","locked":false,"title":"Normalize mantrid logs","user":{"login":"nagas","id":3353494,"avatar_url":"https://avatars.githubusercontent.com/u/3353494?v=3","gravatar_id":"","url":"https://api.github.com/users/nagas","html_url":"https://github.com/nagas","followers_url":"https://api.github.com/users/nagas/followers","following_url":"https://api.github.com/users/nagas/following{/other_user}","gists_url":"https://api.github.com/users/nagas/gists{/gist_id}","starred_url":"https://api.github.com/users/nagas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagas/subscriptions","organizations_url":"https://api.github.com/users/nagas/orgs","repos_url":"https://api.github.com/users/nagas/repos","events_url":"https://api.github.com/users/nagas/events{/privacy}","received_events_url":"https://api.github.com/users/nagas/received_events","type":"User","site_admin":false},"body":"1. Don't log stack traces\r\n2. Severity string (INFO, ERROR, etc) is not of fixed size any more\r\n3. Separate parts (time, severity, message, request_id) of the message are quoted so that it's easy now to create a proper fluentd regex \r\n\r\nI hope the way I format message with request_id string is acceptable as that was much easier than writing a custom formatter.\r\n\r\nSample \r\n```\r\n\"2015-03-10 14:08:03\" - \"INFO\" - \"Using configuration file /etc/mantrid/mantrid.conf\"\r\n\"2015-03-10 14:08:04\" - \"INFO\" - \"Dropped to GID 2020\"\r\n\"2015-03-10 14:08:04\" - \"INFO\" - \"Dropped to UID 2020\"\r\n\"2015-03-10 14:08:04\" - \"INFO\" - \"Listening for requests on ('::', 9999)\"\r\n\"2015-03-10 14:08:04\" - \"INFO\" - \"Listening for requests on ('::', 8080)\"\r\n\"2015-03-10 14:08:04\" - \"INFO\" - \"Listening for management on ('::', 8042)\"\r\n\"2015-03-10 14:08:27\" - \"ERROR\" - \"Proxy socket error on connect() to Backend((127.0.0.1, 8889)) of test42-elb.fs.production\" - \"asdf\" \r\n\"2015-03-10 14:08:27\" - \"WARNING\" - \"Blacklisting backend Backend((127.0.0.1, 8889)) of test42-elb.fs.production\"\r\n\"2015-03-10 14:08:28\" - \"WARNING\" - \"Retrying connection for host test42-elb.fs.production\" - \"asdf\"\r\n\"2015-03-10 14:08:28\" - \"ERROR\" - \"No healthy backends available for host 'test42-elb.fs.production'\" - \"asdf\"\r\n\"2015-03-10 14:08:30\" - \"ERROR\" - \"No healthy backends available for host 'test42-elb.fs.production'\" - \"asdf\"\r\n\"2015-03-10 14:11:02\" - \"WARNING\" - \"Stopping health-checking of Backend((127.0.0.1, 8889)): available\"\r\n\"2015-03-10 14:12:07\" - \"WARNING\" - \"Timeout serving request to backend Backend((127.0.0.1, 8889)) of test42-elb.fs.production\"\r\n\"2015-03-10 14:12:07\" - \"WARNING\" - \"Timeout serving request to backend Backend((127.0.0.1, 8889)) of test42-elb.fs.production\"\r\n\"2015-03-10 14:16:42\" - \"ERROR\" - \"No healthy backends available for host 'test42-elb.fs.production'\" - \"-\"\r\n```","created_at":"2015-03-10T14:22:21Z","updated_at":"2015-03-10T14:22:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/futuresimple/mantrid/pulls/7/commits","review_comments_url":"https://api.github.com/repos/futuresimple/mantrid/pulls/7/comments","review_comment_url":"https://api.github.com/repos/futuresimple/mantrid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/futuresimple/mantrid/issues/7/comments","statuses_url":"https://api.github.com/repos/futuresimple/mantrid/statuses/8feb2e9d23bef6ac7dfef5f474c84ab044cb3cc8","head":{"label":"futuresimple:normalize-logs","ref":"normalize-logs","sha":"8feb2e9d23bef6ac7dfef5f474c84ab044cb3cc8","user":{"login":"futuresimple","id":725003,"avatar_url":"https://avatars.githubusercontent.com/u/725003?v=3","gravatar_id":"","url":"https://api.github.com/users/futuresimple","html_url":"https://github.com/futuresimple","followers_url":"https://api.github.com/users/futuresimple/followers","following_url":"https://api.github.com/users/futuresimple/following{/other_user}","gists_url":"https://api.github.com/users/futuresimple/gists{/gist_id}","starred_url":"https://api.github.com/users/futuresimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuresimple/subscriptions","organizations_url":"https://api.github.com/users/futuresimple/orgs","repos_url":"https://api.github.com/users/futuresimple/repos","events_url":"https://api.github.com/users/futuresimple/events{/privacy}","received_events_url":"https://api.github.com/users/futuresimple/received_events","type":"Organization","site_admin":false},"repo":{"id":4675536,"name":"mantrid","full_name":"futuresimple/mantrid","owner":{"login":"futuresimple","id":725003,"avatar_url":"https://avatars.githubusercontent.com/u/725003?v=3","gravatar_id":"","url":"https://api.github.com/users/futuresimple","html_url":"https://github.com/futuresimple","followers_url":"https://api.github.com/users/futuresimple/followers","following_url":"https://api.github.com/users/futuresimple/following{/other_user}","gists_url":"https://api.github.com/users/futuresimple/gists{/gist_id}","starred_url":"https://api.github.com/users/futuresimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuresimple/subscriptions","organizations_url":"https://api.github.com/users/futuresimple/orgs","repos_url":"https://api.github.com/users/futuresimple/repos","events_url":"https://api.github.com/users/futuresimple/events{/privacy}","received_events_url":"https://api.github.com/users/futuresimple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/futuresimple/mantrid","description":"An HTTP load balancer that is configurable at runtime","fork":true,"url":"https://api.github.com/repos/futuresimple/mantrid","forks_url":"https://api.github.com/repos/futuresimple/mantrid/forks","keys_url":"https://api.github.com/repos/futuresimple/mantrid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/futuresimple/mantrid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/futuresimple/mantrid/teams","hooks_url":"https://api.github.com/repos/futuresimple/mantrid/hooks","issue_events_url":"https://api.github.com/repos/futuresimple/mantrid/issues/events{/number}","events_url":"https://api.github.com/repos/futuresimple/mantrid/events","assignees_url":"https://api.github.com/repos/futuresimple/mantrid/assignees{/user}","branches_url":"https://api.github.com/repos/futuresimple/mantrid/branches{/branch}","tags_url":"https://api.github.com/repos/futuresimple/mantrid/tags","blobs_url":"https://api.github.com/repos/futuresimple/mantrid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/futuresimple/mantrid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/futuresimple/mantrid/git/refs{/sha}","trees_url":"https://api.github.com/repos/futuresimple/mantrid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/futuresimple/mantrid/statuses/{sha}","languages_url":"https://api.github.com/repos/futuresimple/mantrid/languages","stargazers_url":"https://api.github.com/repos/futuresimple/mantrid/stargazers","contributors_url":"https://api.github.com/repos/futuresimple/mantrid/contributors","subscribers_url":"https://api.github.com/repos/futuresimple/mantrid/subscribers","subscription_url":"https://api.github.com/repos/futuresimple/mantrid/subscription","commits_url":"https://api.github.com/repos/futuresimple/mantrid/commits{/sha}","git_commits_url":"https://api.github.com/repos/futuresimple/mantrid/git/commits{/sha}","comments_url":"https://api.github.com/repos/futuresimple/mantrid/comments{/number}","issue_comment_url":"https://api.github.com/repos/futuresimple/mantrid/issues/comments{/number}","contents_url":"https://api.github.com/repos/futuresimple/mantrid/contents/{+path}","compare_url":"https://api.github.com/repos/futuresimple/mantrid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/futuresimple/mantrid/merges","archive_url":"https://api.github.com/repos/futuresimple/mantrid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/futuresimple/mantrid/downloads","issues_url":"https://api.github.com/repos/futuresimple/mantrid/issues{/number}","pulls_url":"https://api.github.com/repos/futuresimple/mantrid/pulls{/number}","milestones_url":"https://api.github.com/repos/futuresimple/mantrid/milestones{/number}","notifications_url":"https://api.github.com/repos/futuresimple/mantrid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/futuresimple/mantrid/labels{/name}","releases_url":"https://api.github.com/repos/futuresimple/mantrid/releases{/id}","created_at":"2012-06-15T13:38:19Z","updated_at":"2015-03-10T10:47:23Z","pushed_at":"2015-03-10T14:07:36Z","git_url":"git://github.com/futuresimple/mantrid.git","ssh_url":"git@github.com:futuresimple/mantrid.git","clone_url":"https://github.com/futuresimple/mantrid.git","svn_url":"https://github.com/futuresimple/mantrid","homepage":"http://mantrid.readthedocs.org","size":556,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"futuresimple:sandbox","ref":"sandbox","sha":"d732eb7d1612260d0862553f573ffce17d674759","user":{"login":"futuresimple","id":725003,"avatar_url":"https://avatars.githubusercontent.com/u/725003?v=3","gravatar_id":"","url":"https://api.github.com/users/futuresimple","html_url":"https://github.com/futuresimple","followers_url":"https://api.github.com/users/futuresimple/followers","following_url":"https://api.github.com/users/futuresimple/following{/other_user}","gists_url":"https://api.github.com/users/futuresimple/gists{/gist_id}","starred_url":"https://api.github.com/users/futuresimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuresimple/subscriptions","organizations_url":"https://api.github.com/users/futuresimple/orgs","repos_url":"https://api.github.com/users/futuresimple/repos","events_url":"https://api.github.com/users/futuresimple/events{/privacy}","received_events_url":"https://api.github.com/users/futuresimple/received_events","type":"Organization","site_admin":false},"repo":{"id":4675536,"name":"mantrid","full_name":"futuresimple/mantrid","owner":{"login":"futuresimple","id":725003,"avatar_url":"https://avatars.githubusercontent.com/u/725003?v=3","gravatar_id":"","url":"https://api.github.com/users/futuresimple","html_url":"https://github.com/futuresimple","followers_url":"https://api.github.com/users/futuresimple/followers","following_url":"https://api.github.com/users/futuresimple/following{/other_user}","gists_url":"https://api.github.com/users/futuresimple/gists{/gist_id}","starred_url":"https://api.github.com/users/futuresimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/futuresimple/subscriptions","organizations_url":"https://api.github.com/users/futuresimple/orgs","repos_url":"https://api.github.com/users/futuresimple/repos","events_url":"https://api.github.com/users/futuresimple/events{/privacy}","received_events_url":"https://api.github.com/users/futuresimple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/futuresimple/mantrid","description":"An HTTP load balancer that is configurable at runtime","fork":true,"url":"https://api.github.com/repos/futuresimple/mantrid","forks_url":"https://api.github.com/repos/futuresimple/mantrid/forks","keys_url":"https://api.github.com/repos/futuresimple/mantrid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/futuresimple/mantrid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/futuresimple/mantrid/teams","hooks_url":"https://api.github.com/repos/futuresimple/mantrid/hooks","issue_events_url":"https://api.github.com/repos/futuresimple/mantrid/issues/events{/number}","events_url":"https://api.github.com/repos/futuresimple/mantrid/events","assignees_url":"https://api.github.com/repos/futuresimple/mantrid/assignees{/user}","branches_url":"https://api.github.com/repos/futuresimple/mantrid/branches{/branch}","tags_url":"https://api.github.com/repos/futuresimple/mantrid/tags","blobs_url":"https://api.github.com/repos/futuresimple/mantrid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/futuresimple/mantrid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/futuresimple/mantrid/git/refs{/sha}","trees_url":"https://api.github.com/repos/futuresimple/mantrid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/futuresimple/mantrid/statuses/{sha}","languages_url":"https://api.github.com/repos/futuresimple/mantrid/languages","stargazers_url":"https://api.github.com/repos/futuresimple/mantrid/stargazers","contributors_url":"https://api.github.com/repos/futuresimple/mantrid/contributors","subscribers_url":"https://api.github.com/repos/futuresimple/mantrid/subscribers","subscription_url":"https://api.github.com/repos/futuresimple/mantrid/subscription","commits_url":"https://api.github.com/repos/futuresimple/mantrid/commits{/sha}","git_commits_url":"https://api.github.com/repos/futuresimple/mantrid/git/commits{/sha}","comments_url":"https://api.github.com/repos/futuresimple/mantrid/comments{/number}","issue_comment_url":"https://api.github.com/repos/futuresimple/mantrid/issues/comments{/number}","contents_url":"https://api.github.com/repos/futuresimple/mantrid/contents/{+path}","compare_url":"https://api.github.com/repos/futuresimple/mantrid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/futuresimple/mantrid/merges","archive_url":"https://api.github.com/repos/futuresimple/mantrid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/futuresimple/mantrid/downloads","issues_url":"https://api.github.com/repos/futuresimple/mantrid/issues{/number}","pulls_url":"https://api.github.com/repos/futuresimple/mantrid/pulls{/number}","milestones_url":"https://api.github.com/repos/futuresimple/mantrid/milestones{/number}","notifications_url":"https://api.github.com/repos/futuresimple/mantrid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/futuresimple/mantrid/labels{/name}","releases_url":"https://api.github.com/repos/futuresimple/mantrid/releases{/id}","created_at":"2012-06-15T13:38:19Z","updated_at":"2015-03-10T10:47:23Z","pushed_at":"2015-03-10T14:07:36Z","git_url":"git://github.com/futuresimple/mantrid.git","ssh_url":"git@github.com:futuresimple/mantrid.git","clone_url":"https://github.com/futuresimple/mantrid.git","svn_url":"https://github.com/futuresimple/mantrid","homepage":"http://mantrid.readthedocs.org","size":556,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/futuresimple/mantrid/pulls/7"},"html":{"href":"https://github.com/futuresimple/mantrid/pull/7"},"issue":{"href":"https://api.github.com/repos/futuresimple/mantrid/issues/7"},"comments":{"href":"https://api.github.com/repos/futuresimple/mantrid/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/futuresimple/mantrid/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/futuresimple/mantrid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/futuresimple/mantrid/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/futuresimple/mantrid/statuses/8feb2e9d23bef6ac7dfef5f474c84ab044cb3cc8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":15,"deletions":18,"changed_files":3}}