{"action":"created","comment":{"url":"https://api.github.com/repos/eggjs/egg-core/pulls/comments/84003486","pull_request_review_id":4808747,"id":84003486,"diff_hunk":"@@ -157,6 +158,8 @@ class EggCore extends KoaApplication {\n     }).on('ready_timeout', id => {\n       this.console.warn('[egg:core:ready_timeout] 10 seconds later %s was still unable to finish.', id);\n     });\n+\n+    this.ready(() => debug('egg emit ready, application started'));","path":"lib/egg.js","position":13,"original_position":13,"commit_id":"5fd9faeade26bed87adb591cb110a964cbebf5c0","original_commit_id":"3f4767cd2a52aaeefef2fd6a0d3e45c65b063d51","user":{"login":"popomore","id":360661,"avatar_url":"https://avatars.githubusercontent.com/u/360661?v=3","gravatar_id":"","url":"https://api.github.com/users/popomore","html_url":"https://github.com/popomore","followers_url":"https://api.github.com/users/popomore/followers","following_url":"https://api.github.com/users/popomore/following{/other_user}","gists_url":"https://api.github.com/users/popomore/gists{/gist_id}","starred_url":"https://api.github.com/users/popomore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popomore/subscriptions","organizations_url":"https://api.github.com/users/popomore/orgs","repos_url":"https://api.github.com/users/popomore/repos","events_url":"https://api.github.com/users/popomore/events{/privacy}","received_events_url":"https://api.github.com/users/popomore/received_events","type":"User","site_admin":false},"body":"我们把 logger.debug 换成 node 的 debug？现在 debug 不能用环境变量打开，没有作用域，而且不能应用于底层模块。还有不能单独开启 debug，开启后 info 以上都会开启。","created_at":"2016-10-19T06:22:31Z","updated_at":"2016-10-19T06:22:31Z","html_url":"https://github.com/eggjs/egg-core/pull/18#discussion_r84003486","pull_request_url":"https://api.github.com/repos/eggjs/egg-core/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/comments/84003486"},"html":{"href":"https://github.com/eggjs/egg-core/pull/18#discussion_r84003486"},"pull_request":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/eggjs/egg-core/pulls/18","id":89590973,"html_url":"https://github.com/eggjs/egg-core/pull/18","diff_url":"https://github.com/eggjs/egg-core/pull/18.diff","patch_url":"https://github.com/eggjs/egg-core/pull/18.patch","issue_url":"https://api.github.com/repos/eggjs/egg-core/issues/18","number":18,"state":"open","locked":false,"title":"feat: app.js/agent.js support async function","user":{"login":"popomore","id":360661,"avatar_url":"https://avatars.githubusercontent.com/u/360661?v=3","gravatar_id":"","url":"https://api.github.com/users/popomore","html_url":"https://github.com/popomore","followers_url":"https://api.github.com/users/popomore/followers","following_url":"https://api.github.com/users/popomore/following{/other_user}","gists_url":"https://api.github.com/users/popomore/gists{/gist_id}","starred_url":"https://api.github.com/users/popomore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popomore/subscriptions","organizations_url":"https://api.github.com/users/popomore/orgs","repos_url":"https://api.github.com/users/popomore/repos","events_url":"https://api.github.com/users/popomore/events{/privacy}","received_events_url":"https://api.github.com/users/popomore/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for your pull request. Please review below requirements.\r\nBug fixes and new features should include tests and possibly benchmarks.\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n\r\n感谢您贡献代码。请确认下列 checklist 的完成情况。\r\nBug 修复和新功能必须包含测试，必要时请附上性能测试。\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `npm test` passes\r\n- [x] tests and/or benchmarks are included\r\n- [x] documentation is changed or added\r\n- [x] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s). -->\r\n\r\ncustom app/agent\r\n\r\n##### Description of change\r\n<!-- Provide a description of the change below this comment. -->\r\n\r\nYou can use async function to write async code, never readyCallback.\r\n\r\n```js\r\nmodule.exports = async function(app) {\r\n  await doAsync();\r\n};\r\n```\r\n\r\nOr use promise wrap on old node\r\n\r\n```js\r\nconst co = require('co');\r\nmodule.exports = co(function* (app) {\r\n  yield doAsync();\r\n});\r\n```","created_at":"2016-10-17T09:44:54Z","updated_at":"2016-10-19T06:22:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99058fae64a6b4356aac2d65dc7ab36a424c85f4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eggjs/egg-core/pulls/18/commits","review_comments_url":"https://api.github.com/repos/eggjs/egg-core/pulls/18/comments","review_comment_url":"https://api.github.com/repos/eggjs/egg-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eggjs/egg-core/issues/18/comments","statuses_url":"https://api.github.com/repos/eggjs/egg-core/statuses/5fd9faeade26bed87adb591cb110a964cbebf5c0","head":{"label":"eggjs:app-promise","ref":"app-promise","sha":"5fd9faeade26bed87adb591cb110a964cbebf5c0","user":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421577,"name":"egg-core","full_name":"eggjs/egg-core","owner":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg-core","description":"A core Pluggable framework based on koa.","fork":false,"url":"https://api.github.com/repos/eggjs/egg-core","forks_url":"https://api.github.com/repos/eggjs/egg-core/forks","keys_url":"https://api.github.com/repos/eggjs/egg-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg-core/teams","hooks_url":"https://api.github.com/repos/eggjs/egg-core/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg-core/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg-core/events","assignees_url":"https://api.github.com/repos/eggjs/egg-core/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg-core/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg-core/tags","blobs_url":"https://api.github.com/repos/eggjs/egg-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg-core/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg-core/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg-core/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg-core/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg-core/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg-core/subscription","commits_url":"https://api.github.com/repos/eggjs/egg-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg-core/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg-core/merges","archive_url":"https://api.github.com/repos/eggjs/egg-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg-core/downloads","issues_url":"https://api.github.com/repos/eggjs/egg-core/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg-core/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg-core/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg-core/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg-core/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg-core/deployments","created_at":"2016-06-18T07:02:57Z","updated_at":"2016-09-27T09:20:20Z","pushed_at":"2016-10-19T06:21:34Z","git_url":"git://github.com/eggjs/egg-core.git","ssh_url":"git@github.com:eggjs/egg-core.git","clone_url":"https://github.com/eggjs/egg-core.git","svn_url":"https://github.com/eggjs/egg-core","homepage":"http://eggjs.org","size":199,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":34,"default_branch":"master"}},"base":{"label":"eggjs:master","ref":"master","sha":"9ecf888e6e1b7efa1dadbdf5fdc15a57e2019df3","user":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421577,"name":"egg-core","full_name":"eggjs/egg-core","owner":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg-core","description":"A core Pluggable framework based on koa.","fork":false,"url":"https://api.github.com/repos/eggjs/egg-core","forks_url":"https://api.github.com/repos/eggjs/egg-core/forks","keys_url":"https://api.github.com/repos/eggjs/egg-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg-core/teams","hooks_url":"https://api.github.com/repos/eggjs/egg-core/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg-core/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg-core/events","assignees_url":"https://api.github.com/repos/eggjs/egg-core/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg-core/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg-core/tags","blobs_url":"https://api.github.com/repos/eggjs/egg-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg-core/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg-core/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg-core/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg-core/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg-core/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg-core/subscription","commits_url":"https://api.github.com/repos/eggjs/egg-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg-core/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg-core/merges","archive_url":"https://api.github.com/repos/eggjs/egg-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg-core/downloads","issues_url":"https://api.github.com/repos/eggjs/egg-core/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg-core/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg-core/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg-core/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg-core/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg-core/deployments","created_at":"2016-06-18T07:02:57Z","updated_at":"2016-09-27T09:20:20Z","pushed_at":"2016-10-19T06:21:34Z","git_url":"git://github.com/eggjs/egg-core.git","ssh_url":"git@github.com:eggjs/egg-core.git","clone_url":"https://github.com/eggjs/egg-core.git","svn_url":"https://github.com/eggjs/egg-core","homepage":"http://eggjs.org","size":199,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/18"},"html":{"href":"https://github.com/eggjs/egg-core/pull/18"},"issue":{"href":"https://api.github.com/repos/eggjs/egg-core/issues/18"},"comments":{"href":"https://api.github.com/repos/eggjs/egg-core/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eggjs/egg-core/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/eggjs/egg-core/statuses/5fd9faeade26bed87adb591cb110a964cbebf5c0"}}}}
{"actor":{"display_login":"popomore"}}