{"action":"created","comment":{"url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/comments/90495639","pull_request_review_id":11014693,"id":90495639,"diff_hunk":"@@ -1,18 +1,22 @@\n 'use strict';\n \n+// @slajax TODO: re-write this logger so it scales\n const winston = require('winston');\n \n-module.exports = function(options = {}) {\n-  return function(error, req, res, next) {\n+module.exports = function (options = {}) {\n+  return function (error, req, res, next) {\n     if (error) {\n-      const message = `${error.code ? `(${error.code}) ` : '' }Route: ${req.url} - ${error.message}`;\n-      \n+      const message = `${error.code ? `(${error.code}) ` : ''} Route: ${req.url} - ${error.message}`;\n+\n       if (error.code === 404) {\n-        winston.info(message);\n-      }\n-      else {\n-        winston.error(message);\n-        winston.info(error.stack);\n+        if (process.env.NODE_ENV !== 'testing') {\n+          winston.info(message);\n+        }\n+      } else {\n+        if (process.env.NODE_ENV !== 'testing') {\n+          winston.error(message);\n+          winston.info(error.stack);\n+        }\n       }","path":"src/app/templates/server/middleware/logger.js","position":29,"original_position":29,"commit_id":"acdd9794787f062384e87c413533d8f423c17753","original_commit_id":"acdd9794787f062384e87c413533d8f423c17753","user":{"login":"slajax","id":18702,"avatar_url":"https://avatars.githubusercontent.com/u/18702?v=3","gravatar_id":"","url":"https://api.github.com/users/slajax","html_url":"https://github.com/slajax","followers_url":"https://api.github.com/users/slajax/followers","following_url":"https://api.github.com/users/slajax/following{/other_user}","gists_url":"https://api.github.com/users/slajax/gists{/gist_id}","starred_url":"https://api.github.com/users/slajax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slajax/subscriptions","organizations_url":"https://api.github.com/users/slajax/orgs","repos_url":"https://api.github.com/users/slajax/repos","events_url":"https://api.github.com/users/slajax/events{/privacy}","received_events_url":"https://api.github.com/users/slajax/received_events","type":"User","site_admin":false},"body":"I've got a few ideas for how we can improve this to support real time logging once we have an Elastic Search adapter. Winston is fine for now, we mostly just need to support more consistency with how it's being used vs debug.","created_at":"2016-12-01T17:27:25Z","updated_at":"2016-12-01T17:27:25Z","html_url":"https://github.com/feathersjs/feathers-generator/pull/3#discussion_r90495639","pull_request_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/comments/90495639"},"html":{"href":"https://github.com/feathersjs/feathers-generator/pull/3#discussion_r90495639"},"pull_request":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3","id":95753675,"html_url":"https://github.com/feathersjs/feathers-generator/pull/3","diff_url":"https://github.com/feathersjs/feathers-generator/pull/3.diff","patch_url":"https://github.com/feathersjs/feathers-generator/pull/3.patch","issue_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/3","number":3,"state":"open","locked":false,"title":"hooks","user":{"login":"slajax","id":18702,"avatar_url":"https://avatars.githubusercontent.com/u/18702?v=3","gravatar_id":"","url":"https://api.github.com/users/slajax","html_url":"https://github.com/slajax","followers_url":"https://api.github.com/users/slajax/followers","following_url":"https://api.github.com/users/slajax/following{/other_user}","gists_url":"https://api.github.com/users/slajax/gists{/gist_id}","starred_url":"https://api.github.com/users/slajax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slajax/subscriptions","organizations_url":"https://api.github.com/users/slajax/orgs","repos_url":"https://api.github.com/users/slajax/repos","events_url":"https://api.github.com/users/slajax/events{/privacy}","received_events_url":"https://api.github.com/users/slajax/received_events","type":"User","site_admin":false},"body":"### overview\r\n\r\nThe generator should be able to generate standalone hooks in the current directory or by mounting them onto an existing `service.json`. When generating it in standalone mode it would be nice if it also produced the rest of the repo dependencies such as `package.json` etc so it can be published but this should not be the default implementation necessarily.\r\n\r\n\r\n### tasks\r\n- [x] refactor our generator pipeline utils\r\n- [x] build out the generator.js pipeline\r\n- [x] copy to appropriate `hooks/` dir\r\n- [x] properly render with handlebars\r\n- [x] rename hooks based on argv\r\n- [x] mount to `service.json` as before / after\r\n- [x] make sure hook runs\r\n- [x] make sure tests run\r\n- [x] clean up console.logs in tests (`NODE_ENV = testing`)\r\n\r\n### dependencies\r\n- `--config` and `--path` refactor: feathersjs/feathers-cli#50\r\n\r\n### tech debt\r\n- deal with linting #37 \r\n- deal with config conflicts & validation #36 \r\n","created_at":"2016-11-29T18:59:21Z","updated_at":"2016-12-01T17:27:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9249b2302dea201691ed5afc7727c3c2d58ffdd8","assignee":{"login":"slajax","id":18702,"avatar_url":"https://avatars.githubusercontent.com/u/18702?v=3","gravatar_id":"","url":"https://api.github.com/users/slajax","html_url":"https://github.com/slajax","followers_url":"https://api.github.com/users/slajax/followers","following_url":"https://api.github.com/users/slajax/following{/other_user}","gists_url":"https://api.github.com/users/slajax/gists{/gist_id}","starred_url":"https://api.github.com/users/slajax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slajax/subscriptions","organizations_url":"https://api.github.com/users/slajax/orgs","repos_url":"https://api.github.com/users/slajax/repos","events_url":"https://api.github.com/users/slajax/events{/privacy}","received_events_url":"https://api.github.com/users/slajax/received_events","type":"User","site_admin":false},"assignees":[{"login":"slajax","id":18702,"avatar_url":"https://avatars.githubusercontent.com/u/18702?v=3","gravatar_id":"","url":"https://api.github.com/users/slajax","html_url":"https://github.com/slajax","followers_url":"https://api.github.com/users/slajax/followers","following_url":"https://api.github.com/users/slajax/following{/other_user}","gists_url":"https://api.github.com/users/slajax/gists{/gist_id}","starred_url":"https://api.github.com/users/slajax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slajax/subscriptions","organizations_url":"https://api.github.com/users/slajax/orgs","repos_url":"https://api.github.com/users/slajax/repos","events_url":"https://api.github.com/users/slajax/events{/privacy}","received_events_url":"https://api.github.com/users/slajax/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/feathersjs/feathers-generator/milestones/1","html_url":"https://github.com/feathersjs/feathers-generator/milestones/2.0","labels_url":"https://api.github.com/repos/feathersjs/feathers-generator/milestones/1/labels","id":2005279,"number":1,"title":"2.0","description":"First cut of the new generator","creator":{"login":"ekryski","id":599019,"avatar_url":"https://avatars.githubusercontent.com/u/599019?v=3","gravatar_id":"","url":"https://api.github.com/users/ekryski","html_url":"https://github.com/ekryski","followers_url":"https://api.github.com/users/ekryski/followers","following_url":"https://api.github.com/users/ekryski/following{/other_user}","gists_url":"https://api.github.com/users/ekryski/gists{/gist_id}","starred_url":"https://api.github.com/users/ekryski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekryski/subscriptions","organizations_url":"https://api.github.com/users/ekryski/orgs","repos_url":"https://api.github.com/users/ekryski/repos","events_url":"https://api.github.com/users/ekryski/events{/privacy}","received_events_url":"https://api.github.com/users/ekryski/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":8,"state":"open","created_at":"2016-09-14T21:50:00Z","updated_at":"2016-11-29T18:07:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3/commits","review_comments_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3/comments","review_comment_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/3/comments","statuses_url":"https://api.github.com/repos/feathersjs/feathers-generator/statuses/acdd9794787f062384e87c413533d8f423c17753","head":{"label":"feathersjs:slajax/3","ref":"slajax/3","sha":"acdd9794787f062384e87c413533d8f423c17753","user":{"login":"feathersjs","id":5321853,"avatar_url":"https://avatars.githubusercontent.com/u/5321853?v=3","gravatar_id":"","url":"https://api.github.com/users/feathersjs","html_url":"https://github.com/feathersjs","followers_url":"https://api.github.com/users/feathersjs/followers","following_url":"https://api.github.com/users/feathersjs/following{/other_user}","gists_url":"https://api.github.com/users/feathersjs/gists{/gist_id}","starred_url":"https://api.github.com/users/feathersjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feathersjs/subscriptions","organizations_url":"https://api.github.com/users/feathersjs/orgs","repos_url":"https://api.github.com/users/feathersjs/repos","events_url":"https://api.github.com/users/feathersjs/events{/privacy}","received_events_url":"https://api.github.com/users/feathersjs/received_events","type":"Organization","site_admin":false},"repo":{"id":62418211,"name":"feathers-generator","full_name":"feathersjs/feathers-generator","owner":{"login":"feathersjs","id":5321853,"avatar_url":"https://avatars.githubusercontent.com/u/5321853?v=3","gravatar_id":"","url":"https://api.github.com/users/feathersjs","html_url":"https://github.com/feathersjs","followers_url":"https://api.github.com/users/feathersjs/followers","following_url":"https://api.github.com/users/feathersjs/following{/other_user}","gists_url":"https://api.github.com/users/feathersjs/gists{/gist_id}","starred_url":"https://api.github.com/users/feathersjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feathersjs/subscriptions","organizations_url":"https://api.github.com/users/feathersjs/orgs","repos_url":"https://api.github.com/users/feathersjs/repos","events_url":"https://api.github.com/users/feathersjs/events{/privacy}","received_events_url":"https://api.github.com/users/feathersjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/feathersjs/feathers-generator","description":"A metalsmith based generator for scaffolding Feathers apps.","fork":false,"url":"https://api.github.com/repos/feathersjs/feathers-generator","forks_url":"https://api.github.com/repos/feathersjs/feathers-generator/forks","keys_url":"https://api.github.com/repos/feathersjs/feathers-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feathersjs/feathers-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feathersjs/feathers-generator/teams","hooks_url":"https://api.github.com/repos/feathersjs/feathers-generator/hooks","issue_events_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/events{/number}","events_url":"https://api.github.com/repos/feathersjs/feathers-generator/events","assignees_url":"https://api.github.com/repos/feathersjs/feathers-generator/assignees{/user}","branches_url":"https://api.github.com/repos/feathersjs/feathers-generator/branches{/branch}","tags_url":"https://api.github.com/repos/feathersjs/feathers-generator/tags","blobs_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feathersjs/feathers-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/feathersjs/feathers-generator/languages","stargazers_url":"https://api.github.com/repos/feathersjs/feathers-generator/stargazers","contributors_url":"https://api.github.com/repos/feathersjs/feathers-generator/contributors","subscribers_url":"https://api.github.com/repos/feathersjs/feathers-generator/subscribers","subscription_url":"https://api.github.com/repos/feathersjs/feathers-generator/subscription","commits_url":"https://api.github.com/repos/feathersjs/feathers-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/feathersjs/feathers-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/feathersjs/feathers-generator/contents/{+path}","compare_url":"https://api.github.com/repos/feathersjs/feathers-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feathersjs/feathers-generator/merges","archive_url":"https://api.github.com/repos/feathersjs/feathers-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feathersjs/feathers-generator/downloads","issues_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues{/number}","pulls_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/feathersjs/feathers-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/feathersjs/feathers-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feathersjs/feathers-generator/labels{/name}","releases_url":"https://api.github.com/repos/feathersjs/feathers-generator/releases{/id}","deployments_url":"https://api.github.com/repos/feathersjs/feathers-generator/deployments","created_at":"2016-07-01T20:29:50Z","updated_at":"2016-11-12T05:44:06Z","pushed_at":"2016-12-01T02:07:35Z","git_url":"git://github.com/feathersjs/feathers-generator.git","ssh_url":"git@github.com:feathersjs/feathers-generator.git","clone_url":"https://github.com/feathersjs/feathers-generator.git","svn_url":"https://github.com/feathersjs/feathers-generator","homepage":null,"size":111,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":24,"forks":2,"open_issues":24,"watchers":6,"default_branch":"master"}},"base":{"label":"feathersjs:master","ref":"master","sha":"fc914921c6bd6a8fb0e2275eff574ee23ca5517a","user":{"login":"feathersjs","id":5321853,"avatar_url":"https://avatars.githubusercontent.com/u/5321853?v=3","gravatar_id":"","url":"https://api.github.com/users/feathersjs","html_url":"https://github.com/feathersjs","followers_url":"https://api.github.com/users/feathersjs/followers","following_url":"https://api.github.com/users/feathersjs/following{/other_user}","gists_url":"https://api.github.com/users/feathersjs/gists{/gist_id}","starred_url":"https://api.github.com/users/feathersjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feathersjs/subscriptions","organizations_url":"https://api.github.com/users/feathersjs/orgs","repos_url":"https://api.github.com/users/feathersjs/repos","events_url":"https://api.github.com/users/feathersjs/events{/privacy}","received_events_url":"https://api.github.com/users/feathersjs/received_events","type":"Organization","site_admin":false},"repo":{"id":62418211,"name":"feathers-generator","full_name":"feathersjs/feathers-generator","owner":{"login":"feathersjs","id":5321853,"avatar_url":"https://avatars.githubusercontent.com/u/5321853?v=3","gravatar_id":"","url":"https://api.github.com/users/feathersjs","html_url":"https://github.com/feathersjs","followers_url":"https://api.github.com/users/feathersjs/followers","following_url":"https://api.github.com/users/feathersjs/following{/other_user}","gists_url":"https://api.github.com/users/feathersjs/gists{/gist_id}","starred_url":"https://api.github.com/users/feathersjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feathersjs/subscriptions","organizations_url":"https://api.github.com/users/feathersjs/orgs","repos_url":"https://api.github.com/users/feathersjs/repos","events_url":"https://api.github.com/users/feathersjs/events{/privacy}","received_events_url":"https://api.github.com/users/feathersjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/feathersjs/feathers-generator","description":"A metalsmith based generator for scaffolding Feathers apps.","fork":false,"url":"https://api.github.com/repos/feathersjs/feathers-generator","forks_url":"https://api.github.com/repos/feathersjs/feathers-generator/forks","keys_url":"https://api.github.com/repos/feathersjs/feathers-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feathersjs/feathers-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feathersjs/feathers-generator/teams","hooks_url":"https://api.github.com/repos/feathersjs/feathers-generator/hooks","issue_events_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/events{/number}","events_url":"https://api.github.com/repos/feathersjs/feathers-generator/events","assignees_url":"https://api.github.com/repos/feathersjs/feathers-generator/assignees{/user}","branches_url":"https://api.github.com/repos/feathersjs/feathers-generator/branches{/branch}","tags_url":"https://api.github.com/repos/feathersjs/feathers-generator/tags","blobs_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feathersjs/feathers-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/feathersjs/feathers-generator/languages","stargazers_url":"https://api.github.com/repos/feathersjs/feathers-generator/stargazers","contributors_url":"https://api.github.com/repos/feathersjs/feathers-generator/contributors","subscribers_url":"https://api.github.com/repos/feathersjs/feathers-generator/subscribers","subscription_url":"https://api.github.com/repos/feathersjs/feathers-generator/subscription","commits_url":"https://api.github.com/repos/feathersjs/feathers-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/feathersjs/feathers-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/feathersjs/feathers-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/feathersjs/feathers-generator/contents/{+path}","compare_url":"https://api.github.com/repos/feathersjs/feathers-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feathersjs/feathers-generator/merges","archive_url":"https://api.github.com/repos/feathersjs/feathers-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feathersjs/feathers-generator/downloads","issues_url":"https://api.github.com/repos/feathersjs/feathers-generator/issues{/number}","pulls_url":"https://api.github.com/repos/feathersjs/feathers-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/feathersjs/feathers-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/feathersjs/feathers-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feathersjs/feathers-generator/labels{/name}","releases_url":"https://api.github.com/repos/feathersjs/feathers-generator/releases{/id}","deployments_url":"https://api.github.com/repos/feathersjs/feathers-generator/deployments","created_at":"2016-07-01T20:29:50Z","updated_at":"2016-11-12T05:44:06Z","pushed_at":"2016-12-01T02:07:35Z","git_url":"git://github.com/feathersjs/feathers-generator.git","ssh_url":"git@github.com:feathersjs/feathers-generator.git","clone_url":"https://github.com/feathersjs/feathers-generator.git","svn_url":"https://github.com/feathersjs/feathers-generator","homepage":null,"size":111,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":24,"forks":2,"open_issues":24,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3"},"html":{"href":"https://github.com/feathersjs/feathers-generator/pull/3"},"issue":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/issues/3"},"comments":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/feathersjs/feathers-generator/statuses/acdd9794787f062384e87c413533d8f423c17753"}}}}
{"actor":{"display_login":"slajax"}}