{"action":"opened","number":48,"pull_request":{"url":"https://api.github.com/repos/rs/zerolog/pulls/48","id":178421272,"html_url":"https://github.com/rs/zerolog/pull/48","diff_url":"https://github.com/rs/zerolog/pull/48.diff","patch_url":"https://github.com/rs/zerolog/pull/48.patch","issue_url":"https://api.github.com/repos/rs/zerolog/issues/48","number":48,"state":"open","locked":false,"title":"Add function to get Level from string","user":{"login":"dvelitchkov","id":9168240,"avatar_url":"https://avatars0.githubusercontent.com/u/9168240?v=4","gravatar_id":"","url":"https://api.github.com/users/dvelitchkov","html_url":"https://github.com/dvelitchkov","followers_url":"https://api.github.com/users/dvelitchkov/followers","following_url":"https://api.github.com/users/dvelitchkov/following{/other_user}","gists_url":"https://api.github.com/users/dvelitchkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvelitchkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvelitchkov/subscriptions","organizations_url":"https://api.github.com/users/dvelitchkov/orgs","repos_url":"https://api.github.com/users/dvelitchkov/repos","events_url":"https://api.github.com/users/dvelitchkov/events{/privacy}","received_events_url":"https://api.github.com/users/dvelitchkov/received_events","type":"User","site_admin":false},"body":"Basically a reverse of Level's String() method. It's useful, for example, if the log level can be supplied to the application as a command-line param. Not super high-value, but might be a nice-to-have. I've found myself implementing this twice now in my own projects. ","created_at":"2018-03-29T19:35:01Z","updated_at":"2018-03-29T19:35:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d776d6c47e7b2f1954cf3a227854ad9080271c75","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rs/zerolog/pulls/48/commits","review_comments_url":"https://api.github.com/repos/rs/zerolog/pulls/48/comments","review_comment_url":"https://api.github.com/repos/rs/zerolog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rs/zerolog/issues/48/comments","statuses_url":"https://api.github.com/repos/rs/zerolog/statuses/8e21c21a56df7be71678c01e0e884ce685c82a14","head":{"label":"dvelitchkov:master","ref":"master","sha":"8e21c21a56df7be71678c01e0e884ce685c82a14","user":{"login":"dvelitchkov","id":9168240,"avatar_url":"https://avatars0.githubusercontent.com/u/9168240?v=4","gravatar_id":"","url":"https://api.github.com/users/dvelitchkov","html_url":"https://github.com/dvelitchkov","followers_url":"https://api.github.com/users/dvelitchkov/followers","following_url":"https://api.github.com/users/dvelitchkov/following{/other_user}","gists_url":"https://api.github.com/users/dvelitchkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvelitchkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvelitchkov/subscriptions","organizations_url":"https://api.github.com/users/dvelitchkov/orgs","repos_url":"https://api.github.com/users/dvelitchkov/repos","events_url":"https://api.github.com/users/dvelitchkov/events{/privacy}","received_events_url":"https://api.github.com/users/dvelitchkov/received_events","type":"User","site_admin":false},"repo":{"id":127337115,"name":"zerolog","full_name":"dvelitchkov/zerolog","owner":{"login":"dvelitchkov","id":9168240,"avatar_url":"https://avatars0.githubusercontent.com/u/9168240?v=4","gravatar_id":"","url":"https://api.github.com/users/dvelitchkov","html_url":"https://github.com/dvelitchkov","followers_url":"https://api.github.com/users/dvelitchkov/followers","following_url":"https://api.github.com/users/dvelitchkov/following{/other_user}","gists_url":"https://api.github.com/users/dvelitchkov/gists{/gist_id}","starred_url":"https://api.github.com/users/dvelitchkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvelitchkov/subscriptions","organizations_url":"https://api.github.com/users/dvelitchkov/orgs","repos_url":"https://api.github.com/users/dvelitchkov/repos","events_url":"https://api.github.com/users/dvelitchkov/events{/privacy}","received_events_url":"https://api.github.com/users/dvelitchkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dvelitchkov/zerolog","description":"Zero Allocation JSON Logger","fork":true,"url":"https://api.github.com/repos/dvelitchkov/zerolog","forks_url":"https://api.github.com/repos/dvelitchkov/zerolog/forks","keys_url":"https://api.github.com/repos/dvelitchkov/zerolog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dvelitchkov/zerolog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dvelitchkov/zerolog/teams","hooks_url":"https://api.github.com/repos/dvelitchkov/zerolog/hooks","issue_events_url":"https://api.github.com/repos/dvelitchkov/zerolog/issues/events{/number}","events_url":"https://api.github.com/repos/dvelitchkov/zerolog/events","assignees_url":"https://api.github.com/repos/dvelitchkov/zerolog/assignees{/user}","branches_url":"https://api.github.com/repos/dvelitchkov/zerolog/branches{/branch}","tags_url":"https://api.github.com/repos/dvelitchkov/zerolog/tags","blobs_url":"https://api.github.com/repos/dvelitchkov/zerolog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dvelitchkov/zerolog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dvelitchkov/zerolog/git/refs{/sha}","trees_url":"https://api.github.com/repos/dvelitchkov/zerolog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dvelitchkov/zerolog/statuses/{sha}","languages_url":"https://api.github.com/repos/dvelitchkov/zerolog/languages","stargazers_url":"https://api.github.com/repos/dvelitchkov/zerolog/stargazers","contributors_url":"https://api.github.com/repos/dvelitchkov/zerolog/contributors","subscribers_url":"https://api.github.com/repos/dvelitchkov/zerolog/subscribers","subscription_url":"https://api.github.com/repos/dvelitchkov/zerolog/subscription","commits_url":"https://api.github.com/repos/dvelitchkov/zerolog/commits{/sha}","git_commits_url":"https://api.github.com/repos/dvelitchkov/zerolog/git/commits{/sha}","comments_url":"https://api.github.com/repos/dvelitchkov/zerolog/comments{/number}","issue_comment_url":"https://api.github.com/repos/dvelitchkov/zerolog/issues/comments{/number}","contents_url":"https://api.github.com/repos/dvelitchkov/zerolog/contents/{+path}","compare_url":"https://api.github.com/repos/dvelitchkov/zerolog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dvelitchkov/zerolog/merges","archive_url":"https://api.github.com/repos/dvelitchkov/zerolog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dvelitchkov/zerolog/downloads","issues_url":"https://api.github.com/repos/dvelitchkov/zerolog/issues{/number}","pulls_url":"https://api.github.com/repos/dvelitchkov/zerolog/pulls{/number}","milestones_url":"https://api.github.com/repos/dvelitchkov/zerolog/milestones{/number}","notifications_url":"https://api.github.com/repos/dvelitchkov/zerolog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dvelitchkov/zerolog/labels{/name}","releases_url":"https://api.github.com/repos/dvelitchkov/zerolog/releases{/id}","deployments_url":"https://api.github.com/repos/dvelitchkov/zerolog/deployments","created_at":"2018-03-29T19:18:39Z","updated_at":"2018-03-29T19:32:38Z","pushed_at":"2018-03-29T19:32:36Z","git_url":"git://github.com/dvelitchkov/zerolog.git","ssh_url":"git@github.com:dvelitchkov/zerolog.git","clone_url":"https://github.com/dvelitchkov/zerolog.git","svn_url":"https://github.com/dvelitchkov/zerolog","homepage":"","size":531,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rs:master","ref":"master","sha":"05eafee0eb17d0150591a8f30f0fa592cc9b7471","user":{"login":"rs","id":68232,"avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"repo":{"id":91054480,"name":"zerolog","full_name":"rs/zerolog","owner":{"login":"rs","id":68232,"avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rs/zerolog","description":"Zero Allocation JSON Logger","fork":false,"url":"https://api.github.com/repos/rs/zerolog","forks_url":"https://api.github.com/repos/rs/zerolog/forks","keys_url":"https://api.github.com/repos/rs/zerolog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rs/zerolog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rs/zerolog/teams","hooks_url":"https://api.github.com/repos/rs/zerolog/hooks","issue_events_url":"https://api.github.com/repos/rs/zerolog/issues/events{/number}","events_url":"https://api.github.com/repos/rs/zerolog/events","assignees_url":"https://api.github.com/repos/rs/zerolog/assignees{/user}","branches_url":"https://api.github.com/repos/rs/zerolog/branches{/branch}","tags_url":"https://api.github.com/repos/rs/zerolog/tags","blobs_url":"https://api.github.com/repos/rs/zerolog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rs/zerolog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rs/zerolog/git/refs{/sha}","trees_url":"https://api.github.com/repos/rs/zerolog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rs/zerolog/statuses/{sha}","languages_url":"https://api.github.com/repos/rs/zerolog/languages","stargazers_url":"https://api.github.com/repos/rs/zerolog/stargazers","contributors_url":"https://api.github.com/repos/rs/zerolog/contributors","subscribers_url":"https://api.github.com/repos/rs/zerolog/subscribers","subscription_url":"https://api.github.com/repos/rs/zerolog/subscription","commits_url":"https://api.github.com/repos/rs/zerolog/commits{/sha}","git_commits_url":"https://api.github.com/repos/rs/zerolog/git/commits{/sha}","comments_url":"https://api.github.com/repos/rs/zerolog/comments{/number}","issue_comment_url":"https://api.github.com/repos/rs/zerolog/issues/comments{/number}","contents_url":"https://api.github.com/repos/rs/zerolog/contents/{+path}","compare_url":"https://api.github.com/repos/rs/zerolog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rs/zerolog/merges","archive_url":"https://api.github.com/repos/rs/zerolog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rs/zerolog/downloads","issues_url":"https://api.github.com/repos/rs/zerolog/issues{/number}","pulls_url":"https://api.github.com/repos/rs/zerolog/pulls{/number}","milestones_url":"https://api.github.com/repos/rs/zerolog/milestones{/number}","notifications_url":"https://api.github.com/repos/rs/zerolog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rs/zerolog/labels{/name}","releases_url":"https://api.github.com/repos/rs/zerolog/releases{/id}","deployments_url":"https://api.github.com/repos/rs/zerolog/deployments","created_at":"2017-05-12T05:24:39Z","updated_at":"2018-03-29T19:45:53Z","pushed_at":"2018-03-29T19:35:02Z","git_url":"git://github.com/rs/zerolog.git","ssh_url":"git@github.com:rs/zerolog.git","clone_url":"https://github.com/rs/zerolog.git","svn_url":"https://github.com/rs/zerolog","homepage":"","size":531,"stargazers_count":874,"watchers_count":874,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":47,"open_issues":11,"watchers":874,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rs/zerolog/pulls/48"},"html":{"href":"https://github.com/rs/zerolog/pull/48"},"issue":{"href":"https://api.github.com/repos/rs/zerolog/issues/48"},"comments":{"href":"https://api.github.com/repos/rs/zerolog/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/rs/zerolog/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/rs/zerolog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rs/zerolog/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/rs/zerolog/statuses/8e21c21a56df7be71678c01e0e884ce685c82a14"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":21,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"dvelitchkov"}}