{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/koding/logging/pulls/4","id":30370948,"html_url":"https://github.com/koding/logging/pull/4","diff_url":"https://github.com/koding/logging/pull/4.diff","patch_url":"https://github.com/koding/logging/pull/4.patch","issue_url":"https://api.github.com/repos/koding/logging/issues/4","number":4,"state":"open","locked":false,"title":"Implement inherited based logger from a given context/prefix","user":{"login":"fatih","id":438920,"avatar_url":"https://avatars.githubusercontent.com/u/438920?v=3","gravatar_id":"","url":"https://api.github.com/users/fatih","html_url":"https://github.com/fatih","followers_url":"https://api.github.com/users/fatih/followers","following_url":"https://api.github.com/users/fatih/following{/other_user}","gists_url":"https://api.github.com/users/fatih/gists{/gist_id}","starred_url":"https://api.github.com/users/fatih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatih/subscriptions","organizations_url":"https://api.github.com/users/fatih/orgs","repos_url":"https://api.github.com/users/fatih/repos","events_url":"https://api.github.com/users/fatih/events{/privacy}","received_events_url":"https://api.github.com/users/fatih/received_events","type":"User","site_admin":false},"body":"This is needed so we can context based loggers. Especially useful if we want to filter based on multiple users/clients etc.. An example API usage would be:\r\n\r\n```go\r\npackage main\r\n\r\nimport \"github.com/koding/logging\"\r\n\r\nfunc main() {\r\n\tlog := logging.NewLogger(\"kite\")\r\n\tlog.Info(\"This is an ordinary message\")\r\n\tlog.Warning(\"Warning!\")\r\n\r\n\tuser := log.New(\"user\")\r\n\r\n\tuser.Info(\"request has been made\")\r\n\tuser.Info(\"resize is initiated\")\r\n\r\n\tresize := user.New(\"resize\")\r\n\tresize.Info(\"checking size requirements\")\r\n\tresize.Error(\"not allowed: %s\", \"permission denied\")\r\n}\r\n```\r\n\r\n![image](https://cloud.githubusercontent.com/assets/438920/6462841/73733040-c1b5-11e4-964c-21e29aad011a.png)\r\n\r\nTotally backwards compatible, in terms of API methods and performance (context formatter is only substituted if someone calls the `logger.New()`)","created_at":"2015-03-03T12:56:29Z","updated_at":"2015-03-03T12:56:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/koding/logging/pulls/4/commits","review_comments_url":"https://api.github.com/repos/koding/logging/pulls/4/comments","review_comment_url":"https://api.github.com/repos/koding/logging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koding/logging/issues/4/comments","statuses_url":"https://api.github.com/repos/koding/logging/statuses/345614a7b37245dbf37a620e7f6bf12053c2e259","head":{"label":"koding:context","ref":"context","sha":"345614a7b37245dbf37a620e7f6bf12053c2e259","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":17003408,"name":"logging","full_name":"koding/logging","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/logging","description":"Simple logging package in Go","fork":false,"url":"https://api.github.com/repos/koding/logging","forks_url":"https://api.github.com/repos/koding/logging/forks","keys_url":"https://api.github.com/repos/koding/logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/logging/teams","hooks_url":"https://api.github.com/repos/koding/logging/hooks","issue_events_url":"https://api.github.com/repos/koding/logging/issues/events{/number}","events_url":"https://api.github.com/repos/koding/logging/events","assignees_url":"https://api.github.com/repos/koding/logging/assignees{/user}","branches_url":"https://api.github.com/repos/koding/logging/branches{/branch}","tags_url":"https://api.github.com/repos/koding/logging/tags","blobs_url":"https://api.github.com/repos/koding/logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/logging/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/logging/languages","stargazers_url":"https://api.github.com/repos/koding/logging/stargazers","contributors_url":"https://api.github.com/repos/koding/logging/contributors","subscribers_url":"https://api.github.com/repos/koding/logging/subscribers","subscription_url":"https://api.github.com/repos/koding/logging/subscription","commits_url":"https://api.github.com/repos/koding/logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/logging/contents/{+path}","compare_url":"https://api.github.com/repos/koding/logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/logging/merges","archive_url":"https://api.github.com/repos/koding/logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/logging/downloads","issues_url":"https://api.github.com/repos/koding/logging/issues{/number}","pulls_url":"https://api.github.com/repos/koding/logging/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/logging/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/logging/labels{/name}","releases_url":"https://api.github.com/repos/koding/logging/releases{/id}","created_at":"2014-02-19T23:50:57Z","updated_at":"2015-03-03T01:46:20Z","pushed_at":"2015-03-03T12:53:01Z","git_url":"git://github.com/koding/logging.git","ssh_url":"git@github.com:koding/logging.git","clone_url":"https://github.com/koding/logging.git","svn_url":"https://github.com/koding/logging","homepage":null,"size":259,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":20,"default_branch":"master"}},"base":{"label":"koding:master","ref":"master","sha":"9bea19b682b83bb5fa8d0f5a3f81197ac4f5d8c4","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":17003408,"name":"logging","full_name":"koding/logging","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/logging","description":"Simple logging package in Go","fork":false,"url":"https://api.github.com/repos/koding/logging","forks_url":"https://api.github.com/repos/koding/logging/forks","keys_url":"https://api.github.com/repos/koding/logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/logging/teams","hooks_url":"https://api.github.com/repos/koding/logging/hooks","issue_events_url":"https://api.github.com/repos/koding/logging/issues/events{/number}","events_url":"https://api.github.com/repos/koding/logging/events","assignees_url":"https://api.github.com/repos/koding/logging/assignees{/user}","branches_url":"https://api.github.com/repos/koding/logging/branches{/branch}","tags_url":"https://api.github.com/repos/koding/logging/tags","blobs_url":"https://api.github.com/repos/koding/logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/logging/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/logging/languages","stargazers_url":"https://api.github.com/repos/koding/logging/stargazers","contributors_url":"https://api.github.com/repos/koding/logging/contributors","subscribers_url":"https://api.github.com/repos/koding/logging/subscribers","subscription_url":"https://api.github.com/repos/koding/logging/subscription","commits_url":"https://api.github.com/repos/koding/logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/logging/contents/{+path}","compare_url":"https://api.github.com/repos/koding/logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/logging/merges","archive_url":"https://api.github.com/repos/koding/logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/logging/downloads","issues_url":"https://api.github.com/repos/koding/logging/issues{/number}","pulls_url":"https://api.github.com/repos/koding/logging/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/logging/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/logging/labels{/name}","releases_url":"https://api.github.com/repos/koding/logging/releases{/id}","created_at":"2014-02-19T23:50:57Z","updated_at":"2015-03-03T01:46:20Z","pushed_at":"2015-03-03T12:53:01Z","git_url":"git://github.com/koding/logging.git","ssh_url":"git@github.com:koding/logging.git","clone_url":"https://github.com/koding/logging.git","svn_url":"https://github.com/koding/logging","homepage":null,"size":259,"stargazers_count":20,"watchers_count":20,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koding/logging/pulls/4"},"html":{"href":"https://github.com/koding/logging/pull/4"},"issue":{"href":"https://api.github.com/repos/koding/logging/issues/4"},"comments":{"href":"https://api.github.com/repos/koding/logging/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/koding/logging/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/koding/logging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koding/logging/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/koding/logging/statuses/345614a7b37245dbf37a620e7f6bf12053c2e259"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":47,"deletions":3,"changed_files":2}}