{"action":"created","issue":{"url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/7","labels_url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/7/comments","events_url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/7/events","html_url":"https://github.com/FormidableLabs/express-winston-middleware/pull/7","id":65507419,"number":7,"title":"Switch to internal singleton logger.","user":{"login":"ryan-roemer","id":445557,"avatar_url":"https://avatars.githubusercontent.com/u/445557?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-roemer","html_url":"https://github.com/ryan-roemer","followers_url":"https://api.github.com/users/ryan-roemer/followers","following_url":"https://api.github.com/users/ryan-roemer/following{/other_user}","gists_url":"https://api.github.com/users/ryan-roemer/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-roemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-roemer/subscriptions","organizations_url":"https://api.github.com/users/ryan-roemer/orgs","repos_url":"https://api.github.com/users/ryan-roemer/repos","events_url":"https://api.github.com/users/ryan-roemer/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-roemer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-31T17:44:26Z","updated_at":"2015-03-31T17:51:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/pulls/7","html_url":"https://github.com/FormidableLabs/express-winston-middleware/pull/7","diff_url":"https://github.com/FormidableLabs/express-winston-middleware/pull/7.diff","patch_url":"https://github.com/FormidableLabs/express-winston-middleware/pull/7.patch"},"body":"Fixes #3 \r\n\r\n* Add `singleton` param to reuse internal Winston logger.\r\n* Switch `error` and `request` middleware to use internal singleton.\r\n* Add more routes for example app.\r\n\r\n\r\nWatching repeated refreshes with current `master`:\r\n\r\n```\r\n$ git checkout master\r\n$ node examples/server.js | grep -i listen\r\n(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.\r\nTrace\r\n    at addListener (events.js:160:15)\r\n    at Logger.add (/Users/rroemer/scm/fmd/express-winston-middleware/node_modules/winston/lib/winston/logger.js:456:12)\r\n    at /Users/rroemer/scm/fmd/express-winston-middleware/node_modules/winston/lib/winston/logger.js:62:12\r\n    at Array.forEach (native)\r\n    at new exports.Logger (/Users/rroemer/scm/fmd/express-winston-middleware/node_modules/winston/lib/winston/logger.js:61:24)\r\n    at new Log (/Users/rroemer/scm/fmd/express-winston-middleware/index.js:217:15)\r\n    at Object.handle (/Users/rroemer/scm/fmd/express-winston-middleware/index.js:74:25)\r\n    at next (/Users/rroemer/scm/fmd/express-winston-middleware/node_modules/express/node_modules/connect/lib/proto.js:193:15)\r\n    at Object.expressInit [as handle] (/Users/rroemer/scm/fmd/express-winston-middleware/node_modules/express/lib/middleware.js:30:5)\r\n    at next (/Users/rroemer/scm/fmd/express-winston-middleware/node_modules/express/node_modules/connect/lib/proto.js:193:15)\r\n^C\r\n\r\n```\r\n\r\nvs. this branch/PR\r\n\r\n```\r\n$ git checkout chore-request-logger-internal-singleton\r\n$ node examples/server.js | grep -i listen\r\n```"},"comment":{"url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/comments/88187062","html_url":"https://github.com/FormidableLabs/express-winston-middleware/pull/7#issuecomment-88187062","issue_url":"https://api.github.com/repos/FormidableLabs/express-winston-middleware/issues/7","id":88187062,"user":{"login":"didebeach","id":7933457,"avatar_url":"https://avatars.githubusercontent.com/u/7933457?v=3","gravatar_id":"","url":"https://api.github.com/users/didebeach","html_url":"https://github.com/didebeach","followers_url":"https://api.github.com/users/didebeach/followers","following_url":"https://api.github.com/users/didebeach/following{/other_user}","gists_url":"https://api.github.com/users/didebeach/gists{/gist_id}","starred_url":"https://api.github.com/users/didebeach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/didebeach/subscriptions","organizations_url":"https://api.github.com/users/didebeach/orgs","repos_url":"https://api.github.com/users/didebeach/repos","events_url":"https://api.github.com/users/didebeach/events{/privacy}","received_events_url":"https://api.github.com/users/didebeach/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T17:51:32Z","updated_at":"2015-03-31T17:51:32Z","body":"I will try it tomorrow in the office. \r\n\r\nThank you in any case for your absolut great support and help..\r\n"}}