{"action":"created","issue":{"url":"https://api.github.com/repos/bithavoc/express-winston/issues/105","repository_url":"https://api.github.com/repos/bithavoc/express-winston","labels_url":"https://api.github.com/repos/bithavoc/express-winston/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/bithavoc/express-winston/issues/105/comments","events_url":"https://api.github.com/repos/bithavoc/express-winston/issues/105/events","html_url":"https://github.com/bithavoc/express-winston/pull/105","id":137698155,"number":105,"title":"Add per-instance equivalents of all global white/blacklists","user":{"login":"nwah","id":132390,"avatar_url":"https://avatars.githubusercontent.com/u/132390?v=3","gravatar_id":"","url":"https://api.github.com/users/nwah","html_url":"https://github.com/nwah","followers_url":"https://api.github.com/users/nwah/followers","following_url":"https://api.github.com/users/nwah/following{/other_user}","gists_url":"https://api.github.com/users/nwah/gists{/gist_id}","starred_url":"https://api.github.com/users/nwah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwah/subscriptions","organizations_url":"https://api.github.com/users/nwah/orgs","repos_url":"https://api.github.com/users/nwah/repos","events_url":"https://api.github.com/users/nwah/events{/privacy}","received_events_url":"https://api.github.com/users/nwah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-01T21:55:13Z","updated_at":"2016-03-06T15:07:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bithavoc/express-winston/pulls/105","html_url":"https://github.com/bithavoc/express-winston/pull/105","diff_url":"https://github.com/bithavoc/express-winston/pull/105.diff","patch_url":"https://github.com/bithavoc/express-winston/pull/105.patch"},"body":"This PR adds support for passing any any of the whitelists/blacklists as options to `expressWinston.logger()` and `expressWinston.errorLogger()`.\r\n\r\nIt leaves the global arrays intact, but I've prefixed the variable names with \"global\" to make things less ambiguous / avoid variable naming clashes in the code where they're used.\r\n\r\nNew options are:\r\n\r\n```javascript\r\nexpressWinston.errorLogger({\r\n    requestWhitelist: ['foo', 'bar']\r\n});\r\n\r\nexpressWinston.logger({\r\n    ignoredRoutes: ['/foo', '/bar'],\r\n    requestWhitelist: ['foo', 'bar'],\r\n    responseWhitelist: ['foo', 'bar'],\r\n    bodyWhitelist: [...],\r\n    bodyBlacklist: [...]\r\n});\r\n```\r\n\r\nAt our (fairly large) company we're working on common logger that anyone can/should use in their node apps, and we'd like to base it on express-winston. But, theoretically one of those people may use express-winston as well, and could silently break our common logger by modifying these whitelists globally, which makes it a no-go for us. The changes in the PR would fix this for us.\r\n\r\nWhat do you think? Thanks!\r\n—Noah\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bithavoc/express-winston/issues/comments/192906532","html_url":"https://github.com/bithavoc/express-winston/pull/105#issuecomment-192906532","issue_url":"https://api.github.com/repos/bithavoc/express-winston/issues/105","id":192906532,"user":{"login":"rosston","id":108518,"avatar_url":"https://avatars.githubusercontent.com/u/108518?v=3","gravatar_id":"","url":"https://api.github.com/users/rosston","html_url":"https://github.com/rosston","followers_url":"https://api.github.com/users/rosston/followers","following_url":"https://api.github.com/users/rosston/following{/other_user}","gists_url":"https://api.github.com/users/rosston/gists{/gist_id}","starred_url":"https://api.github.com/users/rosston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosston/subscriptions","organizations_url":"https://api.github.com/users/rosston/orgs","repos_url":"https://api.github.com/users/rosston/repos","events_url":"https://api.github.com/users/rosston/events{/privacy}","received_events_url":"https://api.github.com/users/rosston/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T15:07:12Z","updated_at":"2016-03-06T15:07:12Z","body":"Looks good to me. Can you just add some documentation to the readme? I think it would be good enough to simply add them to the Options section for each middleware function. After that, I'll be happy to merge this."}}